Boxerman Posted July 31, 2008 Share Posted July 31, 2008 Hi guys, i installed a script working nicely, i went to edit something and got 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 '' where ad_id=''' at line 1" here is line 1: $tablae = mysql_query("SELECT * FROM ads where ad_id='$id'"); // selecciono todos los registros de la tabla usuarios, ordenado por nombre ive seen the where ad_id= all over the place yet this one is causing a problem? Quote Link to comment Share on other sites More sharing options...
ronnie88 Posted July 31, 2008 Share Posted July 31, 2008 what is the variable input for $id? should say something like $id= something sounds like $id isn't working since its outputting blank make sure you set your session Quote Link to comment Share on other sites More sharing options...
paul2463 Posted July 31, 2008 Share Posted July 31, 2008 it is telling you that $id does not exist Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted July 31, 2008 Share Posted July 31, 2008 before: $tablae = mysql_query("SELECT * FROM ads where ad_id='$id'"); add this: if(!isset($id)) || empty($id)) { die("ID is not set!!"); } see if if that is returned. Quote Link to comment 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.