Jump to content

Archived

This topic is now archived and is closed to further replies.

jimbobsquarepants

Need MySQL Help ....

Recommended Posts

We have a MySQL database, in one of the tables there is a column called product_code and one called product_format. All the products that have a product_code that starts with the letter A are say books... and then the letter B are DVD's ....

So what i want to know is how i do i make it look in the product_code column for items that start with A and make it put Book in the products_format.

Thanks Guy  ;D

Share this post


Link to post
Share on other sites
[code]UPDATE products SET product_format='Book' WHERE product_code LIKE 'A%';[/code]

mod edit: code A is books

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.