Jump to content

Archived

This topic is now archived and is closed to further replies.

tistaharahap

[mysql query] it looked good but it gives an error *solved*

Recommended Posts

This is my QUERY:

[quote]
$query = "INSERT INTO tshirt (name, pricerp, priceusd, colors, sizes, desc, " .
"bthumbname, bthumbsize, bthumbpath, bthumbtype, " .
"pictname, pictsize, pictpath, picttype, " .
"sthumb1name, sthumb1size, sthumb1path, sthumb1type, " .
"sthumb2name, sthumb2size, sthumb2path, sthumb2type, " .
"sthumb3name, sthumb3size, sthumb3path, sthumb3type) VALUES " .
"('$tname', '$pricerp', '$priceusd', '$colors', '$sizes', '$desc', " .
"'$filename[1]', $filesize[1], '$filepath[1]', '$filetype[1]', " .
"'$filename[0]', $filesize[0], '$filepath[0]', '$filetype[0]', " .
"'$filename[2]', $filesize[2], '$filepath[2]', '$filetype[2]', " .
"'$filename[3]', $filesize[3], '$filepath[3]', '$filetype[3]', " .
"'$filename[4]', $filesize[4], '$filepath[4]', '$filetype[4]')";
[/quote]

After examining a few times, I can't find anything wrong. Is there anything wrong with this? MySQL keeps telling me to recheck the syntax. Please help. Pleasee...

Share this post


Link to post
Share on other sites
http://www.phpfreaks.com/forums/index.php/topic,108300.0.html

If you're still having trouble, post the query (with variables expanded) and the error.

Share this post


Link to post
Share on other sites
Thanks for the info. I got it fix.

One of the column names (desc) was a keyword in MySQL when I tried to hook it up in MySQL Query Browser. I changed the column name and it all worked just great. Thanks.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.