supplied argument errors

From: Date: Tue, 23 Jun 2009 20:10:54 +0000
Subject: supplied argument errors
Groups: php.general 
Request: Send a blank email to php-general+get-294484@lists.php.net to get a copy of this message
I think there is something I do not understand in the manual about mysql_fetch_assoc(), mysql_affected_rows() The code works, but I get these annoying messages. snippet: $result = mysql_query($sql, $db); // this is following an UPDATE $row = mysql_fetch_assoc($result); // warning... if (mysql_affected_rows($result) !== -1) //warning... print_r($result); // returns 1 another: $sql = "DELETE FROM book_categories WHERE bookID = $bid"; $result = mysql_query($sql, $db); // warning... $row = mysql_fetch_assoc($result); // warning... if (mysql_num_rows($result) !== 0) { the last: $result = mysql_query($sql,$db); // following an INSERT if (mysql_affected_rows($result) == -1) { // warning.... I have read the manual entries but I think I could use some clarification/explanation. TIA -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." ------------------------------------------------------------- Phil Jourdan --- pj@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php

« previous php.general (#294484) next »