Results 1 to 3 of 3

Thread: How to Update table with more fields?

  1. #1
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to Update table with more fields?

    I need to update table with the following structure:
    values ('','','', '$fname', '$lname',
    '$street', '$city', '$state',
    '$province','$country','$postcode',
    '$phone','$email','$gender',
    '$birthyear', '$service',
    '$username', '$password','$password1','$cryptpswr','','','','','','','','','','','$alteredd','$alteredt')

    How to do correct code for query SET if I have more fields in table and not one?

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    modify and try this to your liking:

    PHP Code:
    $variable mysql_query("UPDATE `mytable` SET `column1`='$column1', `column2`='$column2' WHERE `fname`='$fname' AND `lname`='$lname'"); 
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •