Re: mySQL Parse Error
| From: | jeffrey_n_Dyke at Keane dot com | Date: | Mon, 22 Mar 2004 13:20:09 +0000 |
| Subject: | Re: mySQL Parse Error | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33597@lists.php.net to get a copy of this message | ||
I have a table:
CREATE TABLE
cashmire (id smallint(3) unsigned NOT NULL auto_increment,
itemcode varchar(25) NOT NULL default '', collection char(2) NOT
NULL
default 'cl',
promotion char(1) default 'n', bestSeller char(1) default
'n',
newArrival char(1) default 'n', size varchar(15) default NULL,
colour
varchar(30) default NULL,
image varchar(7) default NULL, currency char(3) default 'MRS',
price
mediumint(8) unsigned NOT NULL default '0', description text,
purchased
smallint(3) unsigned default NULL,
PRIMARY KEY (id), UNIQUE KEY itemcode (itemcode), )
TYPE=MyISAM;
When i run this SQL:
insert into cashmire ('itemcode', 'collection', 'promotion',
'bestSeller',
'newArrival', 'size', 'color', 'image',
'currency', 'price', 'description',
'purchased') values ('31474', 'cl', 'n', 'n',
'y', 'S-M-L-XL', 'AQ-BL-EC',
'', 'MRS', '8400', 'Long sleeve chunky roll neck cardigan (12
ply) with
high
ribbed welt and turn-back cuffs, authentic coconut buttons', '0')
I get:
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 ''itemcode',
'collection', 'promotion', 'bestSeller', 'newArriva
_____________________
Its dying on your first column, which i don't think should be quoted. They
don't seem to be in the manual pages.
http://www.mysql.com/doc/en/INSERT.html
HTH
Jeff
_____________________
I can't understand... tried googling but still no answer!
Can someone help me please,
regards,
nadim attari
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php