w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Rails 3 active record observer not working when updating through MySQL command line/workbench
When you bypass activerecord by modifying the database directly, you naturally bypass all of the activerecord callbacks. So the answer is to update the data through the application, or to use database triggers instead.

Categories : Mysql

Mysql IN stopped working on 5.1
insert into table2 values('1,2,3'); most likely needs to be insert into table2 values('1'); insert into table2 values('2'); insert into table2 values('3'); Then, your sub select select field2 from table2 returns ('1', '2', '3'), and the IN operator can be used to check if the result of the corresponding field from the main select is contained in this set. According to the comments, the same schema seems to have worked before. I am not aware that the IN operator can be used like in the question, and splitting of column values into a row set seems to be non-trivial. Using the FIND_IN_SET() function as proposed by @KaeL, the following query should work: SELECT b.* FROM table2 a INNER JOIN table1 b ON FIND_IN_SET(b.field1, a.field2) > 0; See also Single MySQL field with comma

Categories : Mysql

Basic C program has stopped working: just in time debugger
int* n; declares a pointer to int. It has no address assigned so points to an arbitrary address in memory. This address almost certainly won't be writable. Even if it was writable, it isn't your memory so you don't know what the effects of writing it will be. *n = 20; tries to write to this unpredictable address. This results in undefined behaviour. Crashing is a valid (and useful) type of undefined behaviour. To make your program work, you need to allocate storage for n. You can do this on the stack int n; n = 20; printf("%i ", n); or dynamically on the heap int* n = malloc(sizeof(*n)); if (n == NULL) { printf("Error: out of memory "); return -1; } *n = 20; printf("%i ", *n); free(n); Note that your compiler would have warned you about this use of an uninitialise

Categories : C

MySQL INSERT fails in Python but works fine in MySQL Workbench
You're not passing data to the execute call. Note the closing brace in your example. cur.execute(""" INSERT INTO scoredata (gameid, playerid, starter, pos, min, fgm, fga, tpm, tpa, ftm, fta, oreb, reb, ast, stl, blk, tos, pf, pts) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s); """)//*Remove me* , (player[0], int(player[20]), int(player[19]), player[3], int(player[4]), int(player[5]), int(player[6]), int(player[7]),

Categories : Python

How to take MySQL database backup using MySQL Workbench?
The Data Export function in MySQL Workbench allows 2 of the 3 ways. There's a checkbox Skip Table Data (no-data) on the export page which allows to either dump with or without data. Just dumping the data without meta data is not supported.

Categories : Mysql

How do you create a MUL key in MySQL Workbench?
When you create a non-unique index, describe command shows it as "MUL" . Check http://dev.mysql.com/doc/refman/5.0/en/show-columns.html for more details.

Categories : Mysql

Using xampp/mysql workbench/
You posted this additional comment containing your vhost definition and hosts file contents v-host file <VirtualHost 127.0.0.1:80> DocumentRoot "c:/xampp/htdocs/intranet" ServerName gep.local ServerAlias gep.local CustomLog "c:gep.local-access_log" combined ErrorLog "c:gep.local-error_log" <Directory "c:/xampp/htdocs/intranet"> DirectoryIndex index.php Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> host file: 127.0.0.1 gep.local Here are a few suggestions:- Have you rebooted or restarted the DNS Client to activate your HOSTS file changes. from a command window run started using 'Run as Administrator' do this net stop "DNS

Categories : PHP

How to do a query in Mysql WorkBench?
As documented under Create EER Model from SQL Script: Clicking this action item launches the Reverse Engineer SQL Script wizard. This is a multi-stage wizard that enables you to select the script you want to create your model from. For further information, see Section 7.7.9.1, “Reverse Engineering Using a Create Script”. Following that link: However, if you are working with a script that also contains DML statements you need not remove them; they will be ignored. Instead, you want the Manage Data Import/Export option under Server Administration (within the Workspace section of the Home window).

Categories : Mysql

Import issue with MySQL Workbench
Okay so... Problem solved. It just seems that MySQLWorbench accepts this request with a direct path (no errors, script executed) but doesn't refresh his table view... So my table have been fullfilled around 3 times before I restarted MySQLWorkbench to discover that my table was full. So... Problem solved. Sorry for the time loss.

Categories : Mysql

Insert dates in MySql Workbench
One solution is to disable the foreign key check with SET FOREIGN_KEY_CHECKS: SET FOREIGN_KEY_CHECKS=0; INSERT INTO `myfacebook`.`mensajes` (`Codigo`, `NickUsuario`, `CodigoRedDest`, `Mensaje`, `Fecha`) VALUES ('7', 'MaGo', '1', 'M7', '2013-09-23') SET FOREIGN_KEY_CHECKS=1;

Categories : Mysql

MySQL Workbench not opening on Windows
You need to install Net Framework 4.0 and Microsoft Visual C++ 2010 Redistributable Package (x86) in order to run MySql Workbenchsee: dev.mysql.com/doc/workbench/en/wb-requirements-software.html

Categories : Mysql

MySQL Workbench 6.0.6.11184 too slow
I'm afraid Workbench isn't high on Oracle's priority list, which is sad, because there are few MySQL suites around and with TOAD for MySQL you can't do certain migrations. You could try with TOAD and there's also the MySQL component of Netbeans (which is oracle's by the way). I ditched MySQL Workbench after it kept crashing on a SQLServer to MySQL ETL.

Categories : Mysql

MySQL Workbench: Cannot export a database
MySQL workbench is trying to access your database without a password (notice the using password: NO in the error). Surprisingly you managed to get access to the server instance. Recreate the server instance, or at least try with a newly created instance.

Categories : Mysql

Generate diagram from SQL script in MySQL WorkBench
I have found answer here on official program website: http://dev.mysql.com/doc/workbench/en/wb-reverse-engineer-create-script.html

Categories : Mysql

Trouble Creating a connection in MySQL Workbench
Fedora 18 is a Linux Based Operating System and it works on chmod 777. so there should be authentication problem. otherwise server 127.0.0.1 and host name , username same as we keep in windows. you need to set authentication.

Categories : Mysql

Can't connect to remote server using MySQL Workbench on mac
Does the database allow access to the user test from the IP you are making the call to? In the users table you specify a host from which this user can access the database. Often this may default to localhost or 127.0.0.1

Categories : Mysql

MySQL WorkBench EER diagram dimensions are terrible
Looks like what you are after is a way to limit the output of an image export to a relatively small area, so that it fits nicely in another document. Several options are possible: 1) Export as png and simply cut off the unwanted parts. Depending on the further usage this might be good enough. 2) Export as SVG and use any of the SVG editors to limit the image size to the wanted area only. Then convert it to the format you need in your target document. 3) Set a paper size in the model that encompasses the content as close as possible. E.g. the statement paper type is quite small. Then rearrange your objects. Resize them if you need larger ones. By setting a larger font (via Preferences) you should be able to make the entire appearence larger. Then export as PDF.

Categories : Entity Framework

Mysql WorkBench : Default varchar value as empty
Just put two quotes '' in default field for your column. Or right-click on a column and choose Default ''

Categories : Mysql

Declare syntax error in MYSQL Workbench
After some googling, I got my answer. A Declare statement must be in between Begin and End statement. Additionally, it must be the first statement after the Begin statement. I got the answer from this wonderful site.

Categories : Mysql

How to copy table between two models in Mysql workbench?
Your best option is probably to create a stripped down version of the model that contains the objects you want to carry over. Then open the target model and run File -> Incude Model.. Select the stripped down source model and there you go.

Categories : Mysql

How to view table and database entries from mysql workbench
First goto Open connection to Start Querying -> click on New Connection -> provide connection name and check credentials to connect to db -> then click Test Connection if successful click Ok else put the correct credentials. Double click the connection you just created and you'll see all the schemas on the left side.

Categories : PHP

Moving and Copying Columns Between Tables in MySQL Workbench
The current version of MySQL Workbench is 6.0.7 and yes, you can copy and paste column definitions using the context menu in the table editor (not directly in the diagram). Just open the tables you want to edit. Usually, the editor is reused if an object of the same type is opened for editing, but there's an entry in the context menu of the objects that allows to open the object in a new tab. This way you can have two table editors on 2 tabs and can easily switch back and forth for copying e.g. column definitions.

Categories : Mysql

How to make a 2-dimensional array in MySQL (using Workbench) as a key in a table?
Personally I would go for the following approach: a table movie_theater with all info about the movie theater (id, name, etc etc) a table movie that holds all the movies that can be shown a table projection that links a movie to a movie_theater and has a begin and end time_stamp this way a projection is linked to a movie_theater and a movie. When generating a time table for a certain period you simply select all projections from a certain movie_theater from inbetween the given timestamps

Categories : Mysql

entering chinese value but show garbage in mysql workbench
To debug... Load the XML file into a XML editor like Notepad++ that supports Unicode. Make sure that your JSP file is explicitly stating that its returning Unicode. This is a starting point for that with JSP. Make sure that your MySQL tables are using Unicode.

Categories : Java

db URL works in MySQL Workbench, but not node.js (getaddrinfo ENOTFOUND)
Even though the information was all exactly the same, I got it to connect successfully and run a query by passing the information as a string instead of an object. db = mysql.createConnection('mysql://mysn:mypwd@server-name.cleardb.com/heroku_randomletters?reconnect=true') I'm not marking this as the answer because I'd still like to know why passing the information as an object was failing.

Categories : Mysql

How can I set client configuration for MySQL Workbench without an installed server?
MySQL Workbench doesn't load any server configuration file for its own configuration. It can work on such a config file for a server, however (server section, usually [mysqld] only). MySQL Workbench's configuration is a manual step you have to do in order to connect to a server (be it local or remote).

Categories : Mysql

How do you model disjoint relationships between two relations in MySQL Workbench?
Your referring to the mandatory property of the foreign key makes me believe you are either misunderstanding the meaning of a disjoint relationship, or implementing it with a relation in the wrong "direction". Let's say we want to implement the following schema: class: Staff Member class: Permanent (specialises Staff Member) class: Temporary (specialises Staff Member) a Staff Member is either a Permanent employee or a Temporary contractor A corresponding EER schema would be (MySQL syntax): CREATE TABLE staff_member ( id INT PRIMARY KEY, name VARCHAR(20) NOT NULL ); CREATE TABLE permanent ( id INT PRIMARY KEY, next_appraisal DATETIME NOT NULL, FOREIGN KEY (id) REFERENCES staff_member(id) ); CREATE TABLE temporary ( id INT PRIMARY KEY, contract_end DATETIME NOT NULL,

Categories : Mysql

Dr Java program gets errors when writing query to MySQL Workbench
It seems you have not placed the mysql connector jar file in your classpath. Try adding that jar and run your program. You can download the mysql connector official jdbc jar from here: http://dev.mysql.com/downloads/connector/j/3.1.html

Categories : Java

MySQL Workbench Will not connect to localhost. "Database server instance is unknown"
The error message says it: the service with the name MySQL cannot be found. So probably your MySQL service has a different name? Do you have a service at all? Starting mysql manually from the bin folder is just that: manual. There is no service involved, hence WB cannot manipulate the run state. When you install MySQL with the MySQL installer you have everything in place within a couple minutes and it works right from the start. So first check if you have a service running for your MySQL server and stop starting it manually. If there's a service take its name and enter it in the Windows Service Name field of the configuration manager: Note that MySQL Workbench can manage your server only if it is installed as a Windows service.

Categories : Mysql

I am no longer getting the list of friends who use my app. It was working for a few days, now it has stopped working
This is a known issue, one that Facebook is taking a long time to fix. Please see and repro the issue here: https://developers.facebook.com/bugs/178979062276800?browse=external_tasks_search_results_51d78ad8d6aa07f26501758 As a work-around, you can use the entire friends list and cross-reference every Facebook ID with those in your database to see who is actually using the app.

Categories : Facebook

Live User name search not working. submit also stopped working
$(document).ready(function(){ $("#uname").keyup(function() { var uname = $('#uname').val(); if(uname=="") { $("#disp").html(""); } else { $.ajax({ type: "POST", url: "getuser.php", data: "name="+ uname , success: function(html){ $("#disp").html(html); } }); return false; } }); }); Your script said var name = ... and one line later you check for uname. The above code has that corrected. The rest of your code looks correct to me.

Categories : PHP

Searching time range not working in php/mysql
Your problem is, I believe, that MySQL is doing string comparison between your stored dates and parameter dates. The automatic conversion of DATETIME and TIME columns to strings yields stuff you don't expect. MySQL thinks a raw date (without a time) has a zero time. Try this (see the DATE(?)?) : SELECT materialID FROM schedule_dummy WHERE date_reserve = DATE(?) AND start_time >= TIME(?) AND end_time <= TIME(?) Check this sqlfiddle: http://sqlfiddle.com/#!2/ecc35/12/0 Note: some folks use < rather than <= for an ending time comparison, so contiguous time intervals don't logically overlap.

Categories : PHP

PHP mySQL query not working with variable as in field for SQL TIME type
You're missing single quotes around $stime in your second query : $stime = '06:00:00'; $result = $wpdb->get_var($wpdb->prepare("SELECT * FROM table WHERE start_hour='$stime'", ARRAY_A));

Categories : PHP

Android app has unfortunately stopped working
java.lang.ClassNotFoundException: com.wfwf.everestnewsapp.SplashActivity: This error basically shown when Compiler is unable to instantiate your SplashActivity.java Make sure that you have defined your SplashActivity class in AndroidManifest.xml

Categories : Java

QTAgent32.exe has stopped working
Eventually I found the reason One piece of code was written incorrectly and under some curcumstances caused endless recursion and stack overflow. So if you getting the same error "QTAgent32.exe has stopped working" try to check what is your call stak at this point.

Categories : Unit Testing

EC2 starcluster stopped working
Which version of StarCluster are you using? Is it the latest release or the latest dev version? If I look at your error on the latest dev version, it refers to this line: https://github.com/jtriley/StarCluster/blob/5442e91e159acca48b645f5ddf629d65c59cd7e0/starcluster/node.py#L139 My guess is that you are having an issue with your cluster alias tags. In any cases, it's very strange that even terminating the cluster and starting a new one doesn't solve the issue. If you find anything more, can reproduce the issue or need more help, you may also use StarCluster mailing list. http://mailman.mit.edu/mailman/listinfo/starcluster

Categories : R

Service App stopped working
I think Your Handler might be null in onStartCommand. Since you are using an handler thread, you should wait for the looper to be ready on that thread, and then Initialize the handler with that thread's looper.

Categories : Java

NSURL has stopped working in app
There is probably some illegal charter in the portCode variable, like a space: NSString *parameter = [portCode stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSString *urlString = [NSString stringWithFormat:@"http://easytide.ukho.gov.uk/EASYTIDE/EasyTide/ShowPrediction.aspx?PortID=%@&PredictionLength=7", parameter]; NSURL *easyTidesUrl = [NSURL URLWithString:urlString]; NSData *easyTidesHtmlData = [NSData dataWithContentsOfURL:easyTidesUrl];

Categories : IOS

Vim imaps stopped working on Mac?
Because your .vimrc file came from a Windows machine, it has line endings, so you need to get rid of the (which shows up as ^M). It looks like my Mac doesn't have dos2unix, so you'll probably want to just use tr: tr -d ' ' <~/.vimrc >tmp mv tmp ~/.vimrc Or from within vim itself: :%s/ //g On the off-chance you have s you actually want to keep, :%s/ $ With the implied //

Categories : Osx

My htaccess Stopped Working
For the request URL http://www.mysite.com/resizedimages/header_500x95.jpg your rewrite rule RewriteRule ^(.*)_(.*)x(.*).jpg image.php?u=$1&w=$2&h=$3 [PT,L] would actually match resizedimages/header as $1. Change it to RewriteRule /?(.*)_(.*)x(.*).jpg$ image.php?u=$1&w=$2&h=$3 [PT,L]

Categories : Htaccess



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.