nbarone Posted May 3, 2009 Share Posted May 3, 2009 here is my code: $query = (empty($_GET['series'])) ? "select * from theater_media where media_ID = '$prod_id'" : "select media_ID," . "media_Date," . "media_Series," . "media_Speaker," . "media_Title" . "from theater_media where media_Series='".urldecode(str_replace("'","''",$_GET['series']))."'"; here is the error: Error retrieving results from database. 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 media_Series='Elephants In The Church'' at line 1 any help would be appreciated, thank you! Link to comment https://forums.phpfreaks.com/topic/156659-solved-mysql-error-help/ Share on other sites More sharing options...
gevans Posted May 3, 2009 Share Posted May 3, 2009 echo out the query before it gets executed so you can see it Link to comment https://forums.phpfreaks.com/topic/156659-solved-mysql-error-help/#findComment-824898 Share on other sites More sharing options...
nbarone Posted May 3, 2009 Author Share Posted May 3, 2009 problem solved. was missing a space in front of "from" Link to comment https://forums.phpfreaks.com/topic/156659-solved-mysql-error-help/#findComment-824899 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.