resultCount() Problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I am using a class.database.php which I found on the web, the class
has the following method:

function resultCount()
    $this->totalrecords = mysql_num_rows($this->queryid);
        $this->return_error("Unable to count the number of
rows returned");
    return $this->totalrecords;
} //end function

But the problem I having is when I run the query and call the
resultCount() function to get the number of records it works fine but
when there is no records I have no way of finding out. I've tried the
following but no luck:

If(resultCount() == NULL) doesn't work

if(resultCount() == 0) doesn't work

I need this to return a result if there is no records from the query
so I can use it for validation.


Site Timeline