This is the script I am using. I know a more common way of doing this would be to make the select statement a join statement, but I find that it seems to run a bit smoother like this when I use two seperate select statements and loop them. Anyone have any ideas on how I can streamline this code without putting everything into one join select statement? Thanks in advance.
$sql_list=mysql_query("select distinct listee from hotlist where lister='$username'");
while ($row = mysql_fetch_array($sql_list)){
$listee= $row["listee"];
$sql_name=mysql_query("select distinct usernameOL from ppl_online where usernameOL='$listee'");
while ($row = mysql_fetch_array($sql_name)){
$usernameOL= $row["usernameOL"];
echo "$usernameOL.'<br>'
}
}