Vivid Lust Posted November 28, 2009 Share Posted November 28, 2009 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 3 Hi, i was wondering if someone could help me with this error please? I've been trying for 30 mins to get it sorted out but can't seem to, here is the code: <?php ... $sql = "INSERT INTO `films` (`name`, `director`, `releaseDate`, `type`, `genre`, `translation`, `length`, `synopsis`, `image`, `downloadLink`, `megavideoLink`, `embeddLink` ) VALUES ('$name', '$director', '$releaseDate', '$type', '$genre', '$translation', '$legnth', '$synopsis', '$image', '$downloadLink', '$megavideoLink', '$embedLink'"; mysql_query($sql,$connection) or die(mysql_error()); ... ?> Quote Link to comment https://forums.phpfreaks.com/topic/183229-you-have-an-error-in-your-sql-syntax-check-the-manual-that-corresponds-to-your/ Share on other sites More sharing options...
Zane Posted November 28, 2009 Share Posted November 28, 2009 your missing the end parentheses on your VALUES Quote Link to comment https://forums.phpfreaks.com/topic/183229-you-have-an-error-in-your-sql-syntax-check-the-manual-that-corresponds-to-your/#findComment-967027 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.