Jaswinder Posted April 29, 2014 Share Posted April 29, 2014 Insert query not working insert into user(code) values('saafvjfjeklwvlk') where email='[email protected]' 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='[email protected]'' Any idea ? Link to comment https://forums.phpfreaks.com/topic/288105-insert-query-giving-error/ Share on other sites More sharing options...
mac_gyver Posted April 29, 2014 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? Link to comment https://forums.phpfreaks.com/topic/288105-insert-query-giving-error/#findComment-1477582 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 Link to comment https://forums.phpfreaks.com/topic/288105-insert-query-giving-error/#findComment-1477583 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.