The problem im having is that, mysql num rows will not work unless the users id is 1.
if its anything else it displays this
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/theclear/public_html/redline/class/class_db_mysqli.php on line 66
The part calling for the numb rows:
$rrr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}");
print $db->num_rows($rrr);
and the function from class_db_mysqli.php (incl line 66):
function num_rows($result=0)
{
if(!$result) { $result=$this->result; }
return mysqli_num_rows($result);
}
I can't work out why it works fine if userid=1 but not if userid > 1....
as far as i can figure out...
Im -> Id 1 You are -> Id2
$userid=$_GET['u']
if i visit domain.xxx/file.php?u=1
No error and correct results are displayed.
if i visit domain.xxx/file.php?u=2
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/theclear/public_html/redline/class/class_db_mysqli.php on line 66
is displayed