nathanmaxsonadil Posted August 30, 2007 Share Posted August 30, 2007 I'm trying to list people in the hall of fame with points from the table users I have this code but it just display's an empty ul What am I doing wrong??? $sql = "SELECT username, points FROM users LEFT OUTER JOIN halloffame ON(username = famelist) ORDER BY points DESC LIMIT 10"; $result = mysql_query($sql) or die(mysql_error()); if (mysql_num_rows($result) > 0) { echo "<ul>"; while ($row = mysql_fetch_assoc($result)) { echo $row['famelist']; </li>"; } echo "</ul></div>"; } Quote Link to comment https://forums.phpfreaks.com/topic/67270-solved-echo-rowfamel/ Share on other sites More sharing options...
Illusion Posted August 30, 2007 Share Posted August 30, 2007 try this .......FROMĀ users user LEFT OUTER JOIN halloffame ON user.username=halloffame.famelist............ if still u r getting null values then there are no matching rows. Quote Link to comment https://forums.phpfreaks.com/topic/67270-solved-echo-rowfamel/#findComment-337622 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.