RE: [PHP] Re: difference between php3 and php4

2002-02-22 Thread Rick Emery
The warning means the query failed in mysql. Perhaps it failed in the connect. You do not need the number of rows. To determine what the problem is, ALWAYS include a die() clause: $db = mysql_connect("localhost", "", "") or die("Error: ".mysql_error()); mysql_select_db("employee",$db) or die("E

Re: [PHP] Re: difference between php3 and php4

2002-02-22 Thread Andrey Hristov
This error comes when trying to fetch data from a result set but there is no such because there was a problem with the query. Try var_dump($res) and you will see - 0. 0 is not a valid number for resource of type mysql or any other resource. To prevent this every time when using a resource identi