Note: You must be registered in order to post a reply. To register, click here. Registration is FREE! Before posting, make sure you have read this topic!
T O P I C R E V I E W
Webbo
Posted - 17 February 2010 : 17:59:45 I want to update a range of products within a MySql database using phpMyAdmin
The SQL Query I'm using is:
UPDATE `products` SET `manufacturers_id` = '1' WHERE `products`.`products_id` = 3 LIMIT 1;
What I'd like to do is place a range in place of '3' in 'products.products_id'=
So that I can update a range of ID's at once instead of doing them all individually. Can someone please show me how?
Thanks
3 L A T E S T R E P L I E S (Newest First)
Shaggy
Posted - 22 February 2010 : 05:12:49 You're welcome, Webbo
Webbo
Posted - 19 February 2010 : 17:53:00 Thanks Shaggy, worked a treat :)
Shaggy
Posted - 18 February 2010 : 05:48:52 One solution is to use the IN operator and provide a comma separated list of the record you wish to update:
UPDATE TABLE SET FIELD1='value' WHERE FIELD2 IN (comma,separated,list,of,values)