Hi, I have a function in a database abstraction class I am writing that returns the equivelant of mysql_num_rows. I'm trying to test the return value but I'm getting a parse error. I'm assuming the syntax is illegal, what I'm wondering is if anyone knows of a way to get around this.
Here's the snippet from the function:
function num_rows()
{
switch ($this->db_type) {
case "mysql":
return mysql_num_rows($this->result);
break;
....
And here is the snippet that is returning a parse error:
if ($db->numrows()) {
Any ideas on this one?
Thanks,
Brandon