Well... I've spent 3 hours looking at it... I checked spelling, syntax, and logic, and it all gives the same error.
It is part of a page object, in which all of the functions are defined and work fine. The query executes with no problem, but then it gets an error on the mysql_num_rows() line, saying that $result is not a valid result identifier. Anyone know why?
I posted this in the main forum by mistake... Here it is again.
global $PHP_AUTH_USER, $PHP_AUTH_PW, $PHP_SELF;
global $userid, $password, $username, $userconame;
$query = "SELECT id, name FROM companies WHERE username='$username' AND password=password('$password')";
$result = mysql_query($query, $this->conn);