command to update a mysql db table

Discussion in 'PHP' started by Swiftie, May 30, 2009.

  1. #1
    Hi,

    I need the commands for a php file that connects and updates a MySQL database table "admintable" in the "notify" column of that table to change it to the value "on"... only for the specific user "george"....

    Can anyone help me? :)
     
    Swiftie, May 30, 2009 IP
  2. php-lover

    php-lover Active Member

    Messages:
    261
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    58
    #2
    If user is equal to george then
    update table admintable
    set notify to equal to on
     
    php-lover, May 30, 2009 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    mysql_query("UPDATE admintable SET notify = 'on'
    WHERE user = 'George'");
     
    Bohra, May 30, 2009 IP