SQL-PHP Question UPDATE Command

Discussion in 'PHP' started by Master_Moving, Mar 21, 2007.

  1. #1
    Hello Everybody!
    thanks for interest.
    im runnnig an update command in my program , but when update affected 0 rows its looks like success to .
    i know theres function which tells how much rows affected in specific command ? do u know somethin about that ?
    Would really appreciate thank u very much !
     
    Master_Moving, Mar 21, 2007 IP
  2. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #2
    mysql_num_rows( $result );
     
    krakjoe, Mar 21, 2007 IP
  3. Master_Moving

    Master_Moving Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for the fast result!!
    thank u very much!!!
     
    Master_Moving, Mar 21, 2007 IP
  4. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #4
    mysql_num_rows() gives you the number of rows retrieved in a SELECT query.

    mysql_affected_rows() gives you the number of rows affected in a UPDATE/INSERT/DELETE query.
     
    rodney88, Mar 21, 2007 IP