jimbobsquarepants Posted September 4, 2006 Share Posted September 4, 2006 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 Link to comment https://forums.phpfreaks.com/topic/19677-need-mysql-help/ Share on other sites More sharing options...
Daniel0 Posted September 4, 2006 Share Posted September 4, 2006 [code]UPDATE products SET product_format='Book' WHERE product_code LIKE 'A%';[/code]mod edit: code A is books Link to comment https://forums.phpfreaks.com/topic/19677-need-mysql-help/#findComment-85782 Share on other sites More sharing options...
jimbobsquarepants Posted September 5, 2006 Author Share Posted September 5, 2006 Ohhhhh now i see lol Worked great cheers ;D Link to comment https://forums.phpfreaks.com/topic/19677-need-mysql-help/#findComment-86284 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.