1Unreal
07-16-2009, 10:43 PM
Im trying to make something which will show what users a user has refered to the site. Im using this code to do it.
$query = $db->query_read("SELECT `username` FROM `user` WHERE `referrerid` = $id");
$results = $db->fetch_array($query);
ob_start();
print_r($results);
$referers = ob_get_contents();
ob_end_clean();
The problem is that this only fetches 1 result. I need to get them all.
$query = $db->query_read("SELECT `username` FROM `user` WHERE `referrerid` = $id");
$results = $db->fetch_array($query);
ob_start();
print_r($results);
$referers = ob_get_contents();
ob_end_clean();
The problem is that this only fetches 1 result. I need to get them all.