supplied argument errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux