Hi
This may look silly (absolute begginer):
I have this mySQL table 'clientes', with fields id, nome, unome
I want to display data like
unome (Johnson)
nome (Mike)
nome (John)
unome (Spielberg)
nome (Steven)
nome (Thomas)
I've tried this code (and others similar. Basically I've tried a lot of variations within this scheme). Can't do it. Help, please ...
$titulo = mysql_query("SELECT unome FROM clientes GROUP BY unome");
$result = mysql_query("SELECT unome, nome, id FROM clientes ORDER BY unome, nome");
while ($nomes = mysql_fetch_array($result) and $unomes = mysql_fetch_array($titulo)) {
$uapelido = $unomes["unome"];
$cf = $nomes["id"];
$apelido = $nomes["unome"];
$nome = $nomes["nome"];
echo("<tr><td width='25%' border=0><b>
$uapelido</b></td></tr>");
if ($apelido == $uapelido) {
echo("<tr><td width='75%' border=0>$nome</td></tr>");
}
}
Tks
Artur