Código PHP:
mysql_select_db($database_Astur, $Astur);
$letras = "SELECT DISTINCTROW inicial FROM glosario ORDER BY inicial Asc";
$Recordset1 = mysql_query($letras, $Astur) or die(mysql_error());
echo "<br><table width='95%' border='1' cellpadding='0' cellspacing='0' bordercolor='#FFFFFF'><tr><td style='border-bottom-color:#003399' align='center'>";
while($row = mysql_fetch_array($Recordset1)){
echo "<A class='fchautor' style='font-weight:normal' HREF=\"#".$row['inicial']."\">".$row['inicial']."</A> ";
} echo "</td></tr></table>";
Código PHP:
$cons = "SELECT * FROM glosario ORDER BY termino Asc";
$Recordset2 = mysql_query($cons, $Astur) or die(mysql_error());
$inicial="";
while($row = mysql_fetch_array($Recordset2)){
echo "<br>";
if ($row['inicial']!=$inicial) { echo "<br><br><table width='95%' border='1' cellpadding='0' cellspacing='0' bordercolor='#FFFFFF'><tr><td style='border-bottom-color:#669999'><A class='tituloarticulo' NAME=".$row['inicial'].">".$row['inicial']."</A></td></tr></table><br><br>"; $inicial=$row['inicial'];}
echo "<span class='boe_tituloley'><A name=".$row['termino'].">".$row['termino']."</A>:</span> <span class='redaccion'> ".$row['definicion']."</span>";
}
Espero vuestras ideas.