Where are you calling the function numrows()? The error code states that you are sending a boolean to the function and you should be sending a mysql resource. This resource comes from a valid mysql query. Maybe the sql query you are making is not valid and produces a FALSE boolean and then you are trying to send this boolean to the numrows() function. I suggest you check out the following on PHP.net: [fi2.php.net...] [fi2.php.net...]
Msg#: 3704291 posted 4:45 am on Jul 23, 2008 (gmt 0)
It means that wherever you are calling the function numrows($var) the $var isn't a valid argument. It should be the result from mysqli_query. The code that you have given us is correct. You are calling the function numrows somewhere else in your code and that is what is creating the error.