Re: [PHP-DB] Displaying SQL Results

2006-09-08 Thread JM
Thanks for the quick reply. Actually I figured it out by using aliasing: $sql_records = "SELECT MAX(user) AS user_name, email, COUNT(user) AS user_count FROM table_1 GROUP BY user DESC LIMIT 10;"; print $row["user_name"] . " - " . $row["user_count"]; This will display the top 10 users in desc

RE: [PHP-DB] Displaying SQL Results

2006-09-08 Thread Bastien Koert
try while($row = $db->sql_fetchrow($result)) { //[INSERT CODE HERE, I want to display the 'user' and 'count'] $user = $row[0]; $count = $row[1]; } bastien From: JM <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] Displaying S