Michdd Posted October 25, 2008 Share Posted October 25, 2008 Is there a proper MySql function that is INSERT WHERE? If so, can someone please give me the syntax? Quote Link to comment https://forums.phpfreaks.com/topic/130118-solved-insert-where/ Share on other sites More sharing options...
PFMaBiSmAd Posted October 25, 2008 Share Posted October 25, 2008 These are the available INSERT statements - 12.2.4. INSERT Syntax INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [iGNORE] [iNTO] tbl_name [(col_name,...)] {VALUES | VALUE} ({expr | DEFAULT},...),(...),... [ ON DUPLICATE KEY UPDATE col_name=expr [, col_name=expr] ... ] Or: INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [iGNORE] [iNTO] tbl_name SET col_name={expr | DEFAULT}, ... [ ON DUPLICATE KEY UPDATE col_name=expr [, col_name=expr] ... ] Or: INSERT [LOW_PRIORITY | HIGH_PRIORITY] [iGNORE] [iNTO] tbl_name [(col_name,...)] SELECT ... [ ON DUPLICATE KEY UPDATE col_name=expr [, col_name=expr] ... ] INSERT inserts new rows into an existing table. There is no WHERE clause. What exactly are you trying to accomplish? Quote Link to comment https://forums.phpfreaks.com/topic/130118-solved-insert-where/#findComment-674737 Share on other sites More sharing options...
Michdd Posted October 26, 2008 Author Share Posted October 26, 2008 Nevermind, I'm using the UPDATE function, I thought that UPDATE wouldn't work at first because I tried it and it wasn't working, but I noticed I was using a null variable, on accident. Thanks for your help Quote Link to comment https://forums.phpfreaks.com/topic/130118-solved-insert-where/#findComment-674761 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.