rnmcd Posted July 26, 2005 Posted July 26, 2005 The person that is helping me design a web site asked me to go into phpmyadmin and enter the following two queries in the 'sql' tab: >INSERT INTO default_listingsDB (ID) VALUES (1111) DELETE FROM default_listingsDB WHERE ID = 1111 Does anyone know what these queries will do? Quote
TweezerMan Posted July 26, 2005 Posted July 26, 2005 The first query creates a record in the 'default_listingsDB' table and sets the value of the ID field to '1111'. The second query deletes the record just created above, and also any others that might exist in the table that also have an ID equal to '1111'. Quote
rnmcd Posted July 27, 2005 Author Posted July 27, 2005 I just pasted: INSERT INTO default_listingsDB (ID) VALUES (1111) DELETE FROM default_listingsDB WHERE ID = 1111 into the box in the sql tab and clicked 'go'. Phpmyadmin displayed: MySQL said: #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 default_listingsDB WHERE ID = 1111' at line 3 Any idea what the SQL syntax may be? Thank you. Quote
TweezerMan Posted July 27, 2005 Posted July 27, 2005 You may need quotes around the 1111 in the DELETE statement: >DELETE FROM default_listingsDB WHERE ID = '1111' Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.