On Wed, Jan 6, 2010 at 2:34 PM, Hassan Schroeder <hassan.schroe...@gmail.com > wrote:
> On Wed, Jan 6, 2010 at 1:25 PM, Victor Subervi <victorsube...@gmail.com> > wrote: > > > mysql> update products set SKU="prodSKU2", Category="prodCat1", > > Name="name2", Title="title2", Description="descr", Price="22.55", > > SortFactor="500", Availability="1", OutOfStock="0", Weight="5.5", > > ShipFlatFee="10.0", ShipPercentPrice="5", ShipPercentWeight="2", > > sizes=('Extra-small, Large, Small, Medium, XLarge, XXLarge, XXXLarge'), > > colorsShadesNumbersShort=('aqua:7FFFD4, blue:333399, gray:465945, > > navy-blue:CC7722, black:0000FF, maroon:B03060, purple:50404D, > yellow:9ACD32, > > fuchsia:FF77FF') where ID="2"; > > Query OK, 1 row affected, 2 warnings (0.00 sec) > > Rows matched: 1 Changed: 1 Warnings: 2 > > > > mysql> show warnings; > > > +---------+------+---------------------------------------------------------------+ > > | Level | Code | > > Message | > > > +---------+------+---------------------------------------------------------------+ > > | Warning | 1265 | Data truncated for column 'sizes' at row > > 1 | > > | Warning | 1265 | Data truncated for column 'colorsShadesNumbersShort' > at > > row 1 | > > > +---------+------+---------------------------------------------------------------+ > > 2 rows in set (0.00 sec) > > > > Guess again. > > Hardly a guess, that syntax works fine for me: > > mysql> update jeweleryproducts set audience = ('women,seniors') where > product = 'E30123E'; > Query OK, 0 rows affected (0.00 sec) > Rows matched: 1 Changed: 0 Warnings: 0 > > mysql> select product, audience from jeweleryproducts where product = > 'E30123E'; > +---------+---------------+ > | product | audience | > +---------+---------------+ > | E30123E | women,seniors | > +---------+---------------+ > 1 row in set (0.00 sec) > > mysql> > Works well *only* for one entry! Not multiple entries. > > What's the `create table` look like for the table in question? > mysql> describe products; +--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ | ID | tinyint(5) unsigned | NO | PRI | NULL | auto_increment | | SKU | varchar(40) | NO | UNI | NULL | | | Category | varchar(40) | YES | | NULL | | | Name | varchar(50) | NO | | NULL | | | Title | varchar(100) | NO | | NULL | | | Description | mediumtext | NO | | NULL | | | Price | float(8,2) | YES | | NULL | | | SortFactor | int(4) | YES | | 500 | | | Availability | tinyint(1) | NO | | 1 | | | OutOfStock | tinyint(1) | NO | | 0 | | | Weight | float(7,2) | NO | | 0.00 | | | ShipFlatFee | float(5,2) | NO | | 10.00 | | | ShipPercentPrice | tinyint(2) unsigned | NO | | 5 | | | ShipPercentWeight | tinyint(2) unsigned | NO | | 2 | | | pic0 | mediumblob | YES | | NULL | | | pic1 | mediumblob | YES | | NULL | | | sizes | set('Extra-small','Small','Medium','Large','XLarge','XXLarge','XXXLarge') | YES | | NULL | | | colorsShadesNumbersShort | set('blue:333399','gray:465945','purple:50404D','navy-blue:CC7722','fuchsia:FF77FF','aqua:7FFFD4','maroon:B03060','black:0000FF','yellow:9ACD32') | YES | | NULL | | +--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ 18 rows in set (0.00 sec) V