mike12255 Posted October 25, 2009 Share Posted October 25, 2009 So i cant figure out what or how, but aparently in my sql i have a constent escaping the string can anyone spot the error..?? Name is defined earlier it is passed as a paramiter through the function. <?php $x=2; $z=1; while($x != 0){ $temp2 = $name.$x; $get = "SELECT content FROM " .NC_DB_PREFIX." content WHERE name ='".$temp2"'"; $res = mysql_query($get) or die (mysql_error()); $row = mysql_fetch_assoc($res); ?> Link to comment https://forums.phpfreaks.com/topic/178948-solved-another-sql-error/ Share on other sites More sharing options...
mrMarcus Posted October 25, 2009 Share Posted October 25, 2009 $get = "SELECT content FROM " .NC_DB_PREFIX." content WHERE name ='".$temp2"'"; should be: $get = "SELECT content FROM " .NC_DB_PREFIX." content WHERE name ='".$temp2."'"; you were missing a connecting . after $temp2 Link to comment https://forums.phpfreaks.com/topic/178948-solved-another-sql-error/#findComment-944105 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.