Results 1 to 3 of 3

Thread: Update problem

  1. #1
    Join Date
    Mar 2006

    Unanswered: Update problem

    i have an update statement thats suppose to update two colums. It is only updating one colum? The color in red it isnt updating


    $NEW = $_POST['S1'];
    $NEW2 = $_POST['S2'];

    @ $db2 = mysql_pconnect('localhost', 'XXXXX', 'XXXX');

    mysql_select_db('winnings_win', $db2) or die(mysql_error());

    $query2= "UPATE login SET PODV = '$NEW', PODP = '$NEW2' WHERE PLAY = 'main'";
    $result1 = mysql_query($query2) or exit(mysql_error());

  2. #2
    Join Date
    Apr 2005
    Baltimore, MD
    echo out $query2 and make sure that it is a valid sql statement. Try running that statement directly in mysql.

  3. #3
    Join Date
    Sep 2003
    So. Cal. USA
    fulton's advice is good and I do it a lot..
    echo("<hr \>$query2<hr \>");

    If that doesn't work, try switching columns/variables to help track the problem...

    (UPATE typo, too)
    $query2 = "UPDATE login SET PODP = '$NEW', PODV = '$NEW2' WHERE PLAY = 'main'";

    It's probably something silly... maybe try a single update of only PODV, too...

Posting Permissions

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