Error 1064 Mysql Delete
Contents |
statements DELETE FROM images AS i WHERE i.image_id = 803 AND i.plant_num = 2277 LIMIT 1 DELETE FROM images AS i WHERE i.image_id = 804 AND i.plant_num = 2277 LIMIT 1 DELETE FROM images AS error 1064 mysql 42000 i WHERE i.image_id = 805 AND i.plant_num = 2277 LIMIT 1 but i am error 1064 mysql 42000 create table getting the error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
Error 1064 Mysql 42000 Create Database
version for the right syntax to use near 'AS i WHERE i.image_id = 803 AND i.plant_num = 2277 LIMIT 1; DELETE FROM images A' at line 1 any idea what is causing this because
Error 1064 Mysql 42000 Mysqldump
everything looks okay to me. Thanks in advance ray_broome 25 posts since Aug 2004 Community Member 3Contributors 10Replies 11Views 8 YearsDiscussion Span 8 Years Ago Last Post by mwasif 0 mwasif 10 8 Years Ago Write statements without aliase e.g. DELETE FROM images WHERE image_id = 803 AND plant_num = 2277 LIMIT 1; 0 Discussion Starter ray_broome 8 Years Ago thanks, i tried doin that but still get the same error 1064 mysql 42000 grant all basic error. Query: DELETE FROM images WHERE image_id = 803 AND plant_num = 2277 LIMIT 1; DELETE FROM images WHERE image_id = 804 AND plant_num = 2277 LIMIT 1; DELETE FROM images WHERE image_id = 805 AND plant_num = 2277 LIMIT 1; Error: Could not update the database: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; DELETE FROM images WHERE image_id = 804 AND plant_num = 2277 LIMIT 1; DELETE F' at line 1 and here's a PHP snippet: foreach($removals as $id) $sql .= "\nDELETE FROM images WHERE image_id = ".$id." AND plant_num = ".$_REQUEST['pid']." LIMIT 1;"; 0 trudge 8 8 Years Ago What does your PHP query statement print out as? I'm betting it's not what you think it is. Also, a describe images would help us help you. 0 Discussion Starter ray_broome 8 Years Ago well the query i showed you is what prints out. DELETE FROM images WHERE image_id = 803 AND plant_num = 2277 LIMIT 1; DELETE FROM images WHERE image_id = 804 AND plant_num = 2277 LIMIT 1; DELETE FROM images WHERE image_id = 805 AND plant_num = 2277 LIMIT 1; and describe images
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 about
Error 1064 Mysql Workbench
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask error 1064 mysql 42000 insert Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. error 1064 mysql 42000 foreign key Join them; it only takes a minute: Sign up MySQL error 1064, not sure what I'm doing wrong here up vote -1 down vote favorite mysql -u username -p database -e deletedata.sql I get ERROR 1064 (42000) at line https://www.daniweb.com/programming/databases/threads/123020/mysql-error-1064-when-deleteing 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'deletedata.sql' at line 1 DELETE FROM 'table1' WHERE 'column' <= date_sub(current_date, INTERVAL 37 day); DELETE FROM 'table2' WHERE 'column' <= date_sub(current_date, INTERVAL 37 day); What could I be missing? mysql database mysql-error-1064 share|improve this question edited Feb 28 '10 at 19:59 OMG Ponies 198k36356415 asked Aug 26 '09 at 19:36 user163760 http://stackoverflow.com/questions/1337001/mysql-error-1064-not-sure-what-im-doing-wrong-here I tried both solutions and got the same errors...perplexing! –user163760 Aug 26 '09 at 20:00 Can you do a "describe 'table1'" from the MySQL console and paste your table schema here (or at least the relevant fields) so we can work directly with what you've got? –Brent Nash Aug 26 '09 at 20:45 add a comment| 3 Answers 3 active oldest votes up vote 0 down vote accepted -e executes a statement, not a sql file. What you need: mysql -u user -p pass db and then into the mysql cli: \. deletedata.sql Backslash dot means "source file" Or you can just pipe it: cat delete.sql | mysql -u user -p pass db share|improve this answer answered Aug 26 '09 at 20:33 K. Norbert 7,09523040 Thanks...the last think you said to try worked so I went back and looked at my syntax and checked the manual for mysql. This worked for me: mysql --user=user_name --password=your_password db_name > deletesql.sql Now one last question...there is no output...is there any way to make this verbose so I can get a confirmation that it deleted my data? Thanks. –user163760 Aug 26 '09 at 20:48 Nevermind...I guess I should have RTFM first before posting. --verbose is the flag to be added to the command line. –user163760 Aug 27 '09 at 12:15 add a comment| up vote 1 down vote Single q
sure to 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 error 1064 forum that you want to visit from the selection below. Results 1 to 7 of 7 Thread: MySQL Error 1064 when DELETEing Thread Tools Show Printable Version May 7, 2008,01:08 PM #1 raymond View Profile error 1064 mysql View Forum Posts Newbie Join Date Jun 2005 Posts 28 Rep Power 0 MySQL Error 1064 when DELETEing I'm trying to carry out the following delete statements PHP Code: DELETEFROMimagesASiWHEREi.image_id=803ANDi.plant_num=2277LIMIT1
DELETEFROMimagesASiWHEREi.image_id=804ANDi.plant_num=2277LIMIT1
DELETEFROMimagesASiWHEREi.image_id=805ANDi.