Need help with MySQL query

Discussion in 'MySQL' started by minstrel, Oct 19, 2007.

  1. #1
    I converted to vBulletin from other software and in the process was left with a large number of users with birthdays saying "January 1, 0001" or "January 1, 1901".

    In the database, the birthdates look like this: "01-01-0001".

    Now I can list these with the following query:

    SELECT * 
    FROM `user` 
    WHERE `birthday` = "01-01-0001"
    Code (markup):
    What I want to do is for every user with that birthdate listed simply erase the value (truncate it? replace? update?).

    Can someone provide me with the correct syntax?

    Fugured it out - this worked:

    UPDATE user SET birthday = "" WHERE birthday = "01-01-0001"
    Code (markup):
     
    minstrel, Oct 19, 2007 IP
  2. moodswing

    moodswing Peon

    Messages:
    188
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Good Job! keep it up! You learn how to figure it out! I'm proud of you!
     
    moodswing, Oct 20, 2007 IP