Mysql Error 1065
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more 1065 query was empty phpmyadmin about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users phpmyadmin #1065 - query was empty Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping
1065, 'query Was Empty' Python
each other. Join them; it only takes a minute: Sign up MySQL Error: Query was empty (1065) on simple INSERT statement up vote 1 down vote favorite I am trying to run a large script that creates a table,
The Selected User Was Not Found In The Privilege Table.
and then inserts almost 15,000 rows into it. The table gets created just fine, and then at the 833 INSERT, I get an error: Error: Query was empty (1065) Here is my 833rd INSERT statement (the one that is failing): INSERT INTO CLASSCODE (CLASS_CODE, CLASS_CODE_NAME, RATE_GROUP, PROGRAM_NM, ST_CODE, EFF_DT, EXP_DT) VALUES (10255, "Funeral Directors - incl PL other than Crematory - 10255", 3, "Service", "AZ", 19980801, NULL); I can't see any syntax errors or differences between this mysql error 1064 line, and one that works. FOr reference, here is an example of an INSERT statement that works just fine: INSERT INTO CLASSCODE (CLASS_CODE, CLASS_CODE_NAME, RATE_GROUP, PROGRAM_NM, ST_CODE, EFF_DT, EXP_DT) VALUES (10425, "Frame Shop - Picture/Posters - 10425", 2, "Retail", "AZ", 19980801, NULL); The part that puzzles me is that the error sounds like something that would happen if I was populating the new row using data from another SELECT statement, which was coming up empty. That is not the case, though, as my INSERT statements are all using static data. My table definition looks like this: CREATE TABLE CLASSCODE ( CLASS_CODE INTEGER NOT NULL, CLASS_CODE_NAME VARCHAR(60) NOT NULL, RATE_GROUP SMALLINT NOT NULL, PROGRAM_NM VARCHAR(20) NOT NULL, ST_CODE CHAR(2), EFF_DT DATE, EXP_DT DATE) I am running this script in the GUI MySQL Query Browser. Could it be something to do with the number of rows I'm trying to insert? Do I need to periodically commit? Is there something simple that I am just overlooking? Thanks! mysql mysql-error-1065 share|improve this question edited May 1 '11 at 3:59 OMG Ponies 199k37360417 asked Aug 24 '09 at 23:40 pkaeding 18.6k2173120 2 How are you executing the statements? Also, althought probably not a factor, but how does your table schema look like? –Tchami Aug 24 '09 at 23:48 @Tchami I am running the script from the GUI tool that comes with
SELECT query returning "Query was empty" The SitePoint Forums have moved. You can now find them here. This forum is now closed
Mysql Error Code 1064
to new posts, but you can browse existing content. You can find out more information about the move and how to open a new account (if necessary) here. If you get stuck you can get support by emailing forums@sitepoint.com If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have http://stackoverflow.com/questions/1325348/mysql-error-query-was-empty-1065-on-simple-insert-statement to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. SitePoint Sponsor User Tag List Results 1 to 12 of 12 Thread: Problem with SELECT query returning "Query was empty" Thread Tools Show Printable Version Subscribe to this Thread… Display Linear http://www.sitepoint.com/forums/showthread.php?225847-Problem-with-SELECT-query-returning-quot-Query-was-empty-quot Mode Switch to Hybrid Mode Switch to Threaded Mode Jan 18, 2005,11:05 #1 drb10 View Profile View Forum Posts SitePoint Zealot Join Date Jul 2004 Location Eastland Posts 102 Mentioned 0 Post(s) Tagged 0 Thread(s) Problem with SELECT query returning "Query was empty" I believe the $query works fine. However, the $sql SELECT query produces "MySQL Error #1065: Query was empty Query:" The table and column names in my db are match those used in the query, and the db is full of info. I am using SESSIONS. Can't see the reason for the error 1065. Appreciate any help. Here is my complete code: 0) { echo('Thank You. Your prior available transfer has been deleted.'); } $sql = @mysql_query("SELECT ID,tmodelnum, tdate, tconame FROM transfers WHERE tconame = ('$coname') ORDER BY tdate"); $result = @mysql_query ($sql)or die("MySQL Error #".mysql_errno().": ".mysql_error()."\nQuery: $sql"); if ($sql > 0) { echo(''); } else { echo('You have no transfers posted at this time.'); } while
empty (# 256) If this is your first visit, be sure to http://board.phpbuilder.com/showthread.php?10383962-RESOLVED-Fatal-Error-MySQL-error-1065-Query-was-empty-(-256) check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 8 of 8 Thread: [RESOLVED] mysql error Fatal Error: MySQL error: 1065 : Query was empty (# 256) Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 04-04-2012,09:59 PM #1 sibenye View Profile View Forum Posts Junior query was empty Member Join Date Apr 2012 Posts 3 [RESOLVED] Fatal Error: MySQL error: 1065 : Query was empty (# 256) Hi guys, I need your help, have gone thru my syntax several times, can't seem to find why I am having this error. The function is meant to take an array of inputs from an HTML form, format it using the 'sprintf' and then insert it into the database. PHP Code: functioninsertRecord($fieldarray)
{
$this->errors=array();
global$dbconnection,$query;
$dbconnection=db_connect($this->dbname)ortrigger_error("SQL",E_USER_ERROR);