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 Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.