Re: mysql query

From: Date: Fri, 03 Oct 2003 12:31:59 +0000
Subject: Re: mysql query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164899@lists.php.net to get a copy of this message
DESC is a reserved word (used to indicate a DESCending ORDER bY). N On Friday 03 Oct 2003 11:17 am, Cameron Metzke wrote: > ok im stumped lol i have used this code in the past to insert data into > mysql (im relitively new though) > ------code-------- > mysql_query("INSERT INTO Images (Image, desc) VALUES ('$name', > '$description')") or die (mysql_error()); > --end code--------- > but i get this error] > ---------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 ''Image', > 'desc') VALUES ('2419091.jpg', 'stone')' at line 1 > ----------- end error-------------- > I found if i just try and record the name value it works fine but if i try > to add the description i get the error. > Any clues? > > :)

« previous php.general (#164899) next »