Re: mySQL Parse Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux