homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

Replace values in table
Alter value in one field, all rows of a table

 4:50 pm on Apr 5, 2008 (gmt 0)

I am not good with MySQL but I think there must be a simple way in PHPMyAdmin to do what I need to do.

Basically I have a table of products, a few thousand of them, and they all have a value in the field pWeight of 0. I want to change them to all have a value of 1.

I could go through the lot and edit each record, but I am sure there must be a quicker and simpler way to do it.



 8:54 pm on Apr 5, 2008 (gmt 0)

UPDATE myTable SET pWeight = 1;

I always make a backup of tables before doing something like this, you may want to do the same!


 9:53 pm on Apr 5, 2008 (gmt 0)

:) Thank you, that saved hours.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved