Jump to content

displaying by group


dvayne

Recommended Posts

try

<?php
// conect to db
$result = mysql_query('SELECT * FROM table-name ORDER BY username');
$row = mysql_fetch_array($result);
echo $row['username'],'<br />';
$name = $row['username'];
do{
if($row['username'] != $name){
	echo $row['username'],'<br />';
	$name = $row['username'];
}
echo $row['messages'],'<br />';
} while ($row = mysql_fetch_array($result))
?>

Link to comment
https://forums.phpfreaks.com/topic/103112-displaying-by-group/#findComment-528186
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.