cordoprod Posted July 17, 2008 Share Posted July 17, 2008 Hi.. Can somebody tell me what's wrong with this query... It's driving me crazy $sql = "INSERT INTO travek_video(link,title,desc,uploader) VALUES('".$_POST['link']."','".$_POST['title']."','".$_POST['desc']."','".$_SESSION['username']."')"; I get this error message: 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 'desc,uploader) VALUES('http://youtube.com/watch?v=jMdoGQ6hvCs','Glenn i finsland' at line 1 Link to comment https://forums.phpfreaks.com/topic/115302-solved-query-problems/ Share on other sites More sharing options...
sader Posted July 17, 2008 Share Posted July 17, 2008 maybe column name "desc" makes problems it's MYSQL keyword Link to comment https://forums.phpfreaks.com/topic/115302-solved-query-problems/#findComment-592777 Share on other sites More sharing options...
Jabop Posted July 17, 2008 Share Posted July 17, 2008 You also should look into escaping those values that you're inserting. Link to comment https://forums.phpfreaks.com/topic/115302-solved-query-problems/#findComment-592787 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.