karnegyhall Posted June 29, 2009 Share Posted June 29, 2009 if ($rowAth==$rowAth1) { echo mysql_query("UPDATE tblathletepics SET (strPicPath ='$target', intPicID ='NULL') WHERE intAtheleteID =$ID") or die(mysql_error()); I'm getting the following: "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 '(strPicPath ='upload/SDC10224.JPG', intPicID ='NULL') WHERE intAtheleteID =23' at line 1" what am i doing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/164099-solved-mysql-error-on-update-statement/ Share on other sites More sharing options...
Maq Posted June 29, 2009 Share Posted June 29, 2009 Take out the parenthesis. Read the syntax for updating - UPDATE. Quote Link to comment https://forums.phpfreaks.com/topic/164099-solved-mysql-error-on-update-statement/#findComment-865644 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.