Jump to content

Use PHP to Reset one field to default value in every row


woocha

Recommended Posts

Hey Guys,

 

    I am not sure if this is possible or not, but am trying to update my MySQL db so that every row of one field is restored to its default vaue.  If this is not possible, I would like to set the fields equal to a value. 

 

  has anyone done this before, or does anyone know how to do this?

 

Thanks guys

I want to query my db table that has 325 rows of data.  thats 325 users.  Each users 'members' level is defaulted to 3 and some of them have changed.  I wand to know if it is possible to update all 325 users to the default number 3 using a php script

When I said x=y, it meant any possible conditional that would specify which rows get updated. Like "WHERE user_id = 5" or "WHERE user_fname='Bob' " or whatever. But if you leave out the WHERE part, it will update every single row with the stuff after SET

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.