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 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 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>"; } ?> Link to comment https://forums.phpfreaks.com/topic/104185-mysql-query-help/#findComment-533366 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.