joecooper Posted May 5, 2008 Share Posted May 5, 2008 SELECT * FROM `users` ORDER BY `high` ASC LIMIT 10 i have the above query and it works, but i want to list the results. in the table 'users', i want to list the feilds, 'username' and 'high' thanks Quote Link to comment https://forums.phpfreaks.com/topic/104185-mysql-query-help/ Share on other sites More sharing options...
AP81 Posted May 5, 2008 Share Posted May 5, 2008 SELECT username, high FROM `users` ORDER BY `high` ASC LIMIT 10 Quote Link to comment https://forums.phpfreaks.com/topic/104185-mysql-query-help/#findComment-533364 Share on other sites More sharing options...
bilis_money Posted May 5, 2008 Share Posted May 5, 2008 <?php $query = "SELECT username, high FROM users ORDER BY high ASC LIMIT 10"; $result = mysql_query($query) or die('Error, query failed'); while(list($username, $high) = mysql_fetch_array($result)) { echo "$username, $high <br>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/104185-mysql-query-help/#findComment-533366 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.