Forum Moderators: open

Message Too Old, No Replies

Edit Bulk Field in database

Need database help.

         

Eightrix

6:57 pm on Jun 23, 2007 (gmt 0)

10+ Year Member



Hi,

Have a tricky question here and don't know if it can be done this way but maybe somebody might know.

Lets say in the users table I want to change all the active users (there is a field called active and options are yes and no) So to all users with Active=Yes I would want to change another field in those users, I would want files "type" to =1.

Basicly all Active and And Inactive users have a type=0 and I woudl want to change for active users for type to =1.

Can this be done without going through hundreds of users and changing these files one by one?

Thank You

omoutop

6:40 am on Jun 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



welcome to webmasterworld

try this:

update {table_name} set type='1' where active='yes'

Eightrix

2:45 am on Jun 26, 2007 (gmt 0)

10+ Year Member



Yup, worked great. Thanks!