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? 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. 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
Archived
This topic is now archived and is closed to further replies.