rondog Posted March 3, 2011 Share Posted March 3, 2011 I just need another pair of eyes as I am not seeing the syntax error. I'm sure I'll figure it out right after I post this as that has happened many times before. query: <?php $sql = " INSERT INTO views (user_id,show,show_id,episode,episode_id) VALUES ( '" . $_SESSION['user']['id'] . "', '" . $showTitle . "', '" . $showID . "', '" . $episodeTitle . "', '" . $episodeID . "')"; ?> output: <?php $output = " INSERT INTO views (user_id,show,show_id,episode,episode_id) VALUES ('1','Criminal Minds','9','Episode Title','1')"; ?> 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 'show,show_id,episode,episode_id) VALUES ( '1', 'Criminal Minds', '9',' at line 2 Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted March 3, 2011 Share Posted March 3, 2011 SHOW is a MySQL reserved word. Quote Link to comment Share on other sites More sharing options...
rondog Posted March 3, 2011 Author Share Posted March 3, 2011 Ah..well that explains why I couldn't find the syntax error lol..thank you 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.