PDA

View Full Version : Need help with output


myrveln
09-19-2007, 11:59 AM
I use PHPMyAdmin and there i can browse, and count a specific column and print out contents of that column and also count how many rows with that value.
This is what PHPMyAdmin gives as php code:
$sql = 'SELECT COUNT(*) AS `Rows` , `column` FROM `table` GROUP BY `column` ORDER BY `column`';

Though how do you print it out as PHPMyAdmin does, as two columns in a table?

Fumigator
09-19-2007, 04:31 PM
The example on this page of the manual should help you out:

http://us3.php.net/manual/en/ref.mysql.php