query(" SELECT SQL_CALC_FOUND_ROWS f.FriendID, f.Comment, m.Username, m.Uploaded, m.Downloaded, m.PermissionID, m.Paranoia, m.LastAccess, i.Avatar FROM friends AS f JOIN users_main AS m ON f.FriendID = m.ID JOIN users_info AS i ON f.FriendID = i.UserID WHERE f.UserID = '$UserID' ORDER BY Username LIMIT $Limit"); $Friends = $DB->to_array(false, MYSQLI_BOTH, array(6, 'Paranoia')); // Number of results (for pagination) $DB->query('SELECT FOUND_ROWS()'); list($Results) = $DB->next_record(); // Start printing stuff ?>
You have no friends! :(
'; } // Start printing out friends foreach ($Friends as $Friend) { list($FriendID, $Comment, $Username, $Uploaded, $Downloaded, $Class, $Paranoia, $LastAccess, $Avatar) = $Friend; ?> } // while // close