--> Search / Browse Personals
Meet These
Fourth Ring Members:
// include('mySQLpref.php'); //5 random - chooses 5 random users who have active ads and have photos $getPeopleSql="SELECT a1.adID, a1.userID, a1.Active, a2.adID,a2.Logo FROM AdShort a1, AdTable a2 WHERE a1.Active='1' AND a1.adID=a2.adID AND a2.Logo!='default.jpg'"; $result = mysql_query($getPeopleSql); //Loop through the results and place all the userIDs into an array (should be a way to randomly access this data directly, but I'm dumb) $stanCount=0; while ($peopleRow = mysql_fetch_array($result, MYSQL_NUM)) { //if it is a premium/upgraded ad, then add to the features / premium array $userIDarray[$stanCount]=$peopleRow[1];// just store the userID into the array. $stanCount++; } //Mix it up shuffle($userIDarray); //Loop and display 5 users for ($userNum=0; $userNum<5; $userNum++) { $userID=$userIDarray[$userNum]; $iconHTML= getIconImage($userID); print "$iconHTML
"; } ?>
