Can't find the error :s [SQL]
Keep getting this error:
Quote:
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, tags)VALUES('1','towel','08-22-13-11-09-2','New Title','Posts Content.','m' at line 1
My Query:
PHP Code:
$query = mysqli_query($con, "INSERT INTO posts (category_id, author, date, title, content, image_url, desc, tags)VALUES('$category_id','$author','$date','$title','$content','$image','$desc','$tags')");
That query has to be right, but which part of my insert is screwing up the query?
Re: Can't find the error :s [SQL]
Quote:
Originally Posted by
Joopie
Put spaces before ane after "values"
Verstuurd van mijn HTC Butterfly
That won't help tbh.
He should try and filter his stuff on it & learn how to use MySQLi properly.
Re: Can't find the error :s [SQL]
DESC is a reserved keyword so you should escape it.
Re: Can't find the error :s [SQL]
ahhh that would do it.. DESC didn't even click in my mind.