JEWbacca Posted April 17, 2005 Share Posted April 17, 2005 I was told that I could change all the 'Products Name' with all of the 'Products Model' by using a database query.... can this be done and if so what is the query? Also, is there a way to add the same manufacturer to each and every product? Can this to be done by a database query? Thanks Nate Link to comment Share on other sites More sharing options...
Guest Posted April 17, 2005 Share Posted April 17, 2005 open phpmyadmin and use this sql command Update products set products_name = products_model ; here all products name will be replaced with its product model then locate the manufacters_id of the manufacture name u want to have from the manufactures table then run this sql command Update products set manufacturers_id = '1'; Assuming 1 is the manufacturers_id to be used in all the products thanks arnie I was told that I could change all the 'Products Name' with all of the 'Products Model' by using a database query.... can this be done and if so what is the query? Also, is there a way to add the same manufacturer to each and every product? Can this to be done by a database query? Thanks Nate <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
JEWbacca Posted April 17, 2005 Author Share Posted April 17, 2005 Arnie, Thanks for your reply. I did the manufacture mysql command... worked perfect! But I have a question about the first command you gave me... set products_name = products_model Right now I have things kind of messed up, reason being that I have my product's names in the product model area and the product models in the product name area... Will this command only change the product names to match the model, or will it infact swap the info completely to the respectable other field? Thanks, Nate Link to comment Share on other sites More sharing options...
FalseDawn Posted April 17, 2005 Share Posted April 17, 2005 DON'T run the query you were given - you'll lose all your product names - it won't swap them. Create an extra (temporary) column to hold your product names, copy the product names to that, then update your product names, then use the data in the temporary column to overwrite the product models. If you can't do this yourself, PM me I can do it for you in 2 minutes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.