[thelist] PHP MYSQL INSERT PROBLEM
Jay Blanchard
jay.blanchard at niicommunications.com
Wed Oct 15 09:51:01 CDT 2003
[snip]
connected ok You have an error in your SQL syntax near '' at line 1
[/snip]
It means line 1 of the SQL statement itself....
[snip]
$query = "INSERT INTO ceramictiles (id, vender#, thumbpath, largepath)
VALUES ('$id','$vender', '$thumb', '$large')";
[/snip]
Use backticks to make things clear in PHP around table & column names
(its good practice and save frustration)
$query = "INSERT INTO `ceramictiles` (`id`, `vender#`, `thumbpath`,
`largepath`)
VALUES ('$id','$vender', '$thumb', '$large')";
My guess is that the # sign is throwing the error here, or else 'vender'
should be 'vendor'
More information about the thelist
mailing list