Re: mySQL Parse Error

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: mySQL Parse Error
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-33599@lists.php.net to get a copy of this message
You are also trying to insert '8400' (characters) into a mediumint (price)? ----------Original Message--------- > Hi, > > 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 > > I can't understand... tried googling but still no answer! > > Can someone help me please, > > regards, > > nadim attari

« previous php.db (#33599) next »