jeff5656 Posted April 4, 2009 Share Posted April 4, 2009 I get this 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 '' at line 1 $sql = "UPDATE xrayconf SET signoff_status = 'a' WHERE id_incr = ".$_POST['id_incr'].""; if (isset($sql) && !empty($sql)) { echo "<!--" . $sql . "-->"; $result = mysql_query($sql) or die ("Invalid query: " . mysql_error()); Thank you. Link to comment https://forums.phpfreaks.com/topic/152543-solved-sql-syntax-error/ Share on other sites More sharing options...
revraz Posted April 4, 2009 Share Posted April 4, 2009 Echo $sql and post the result Link to comment https://forums.phpfreaks.com/topic/152543-solved-sql-syntax-error/#findComment-801198 Share on other sites More sharing options...
Mchl Posted April 4, 2009 Share Posted April 4, 2009 How does the query look like? My guess is that $_POST['id_incr'] is empty Link to comment https://forums.phpfreaks.com/topic/152543-solved-sql-syntax-error/#findComment-801199 Share on other sites More sharing options...
jeff5656 Posted April 4, 2009 Author Share Posted April 4, 2009 Yeah id_incr was empty. I fixed that back on the form page. thanks! Link to comment https://forums.phpfreaks.com/topic/152543-solved-sql-syntax-error/#findComment-801216 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.