Jaswinder Posted April 29, 2014 Share Posted April 29, 2014 (edited) Insert query not working insert into user(code) values('saafvjfjeklwvlk') where email='abc@yahoo.com' tablename - user column name - code error - 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 'where email='abc@yahoo.com'' Any idea ? Edited April 29, 2014 by Jaswinder Quote Link to comment Share on other sites More sharing options...
Solution mac_gyver Posted April 29, 2014 Solution Share Posted April 29, 2014 INSERT queries don't have WHERE clauses. an INSERT query inserts a new row, using the values you supply in the query. perhaps you are thinking of an UPDATE query? Quote Link to comment Share on other sites More sharing options...
Jaswinder Posted April 29, 2014 Author Share Posted April 29, 2014 Now i really pissed off, such a big mistake.. i really need break from coding thanks for correcting me Quote Link to comment Share on other sites More sharing options...
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.