Ver Mensaje Individual
  #7 (permalink)  
Antiguo 17/09/2004, 04:26
Avatar de capuleto
capuleto
 
Fecha de Ingreso: octubre-2003
Ubicación: Cartagena
Mensajes: 219
Antigüedad: 20 años, 6 meses
Puntos: 0
Oh, si hay alguna manera de recorrer estos registros colo los recibo asi asciativo, es decir, como los puedo recorrer en forma asociativa??? y mostrarlos...ok...
Con MySQL si funciona correctamente, aqui esta el codigo..
Código PHP:
<?php
// open database connection
@mysql_connect('localhost','root','') or die("ERROR--CAN'T CONNECT TO SERVER");
@
mysql_select_db('links_db') or die("ERROR--CAN'T CONNECT TO DB");

// SQL query to return data in selected table
$sql_query "SELECT * FROM menu";
$row_count mysql_query($sql_query);

// create table
echo ("<table width=\"100%\" border=\"0\" align=\"center\">");
echo (
"<tr> <td bgcolor=\"#D0D8CF\">Men&uacute; Din&aacute;mico</td> </tr>");

// while records exists to fetch from table, repeat this action
while ($line mysql_fetch_row($row_count)) {
echo (
"<tr>");
echo (
"<td>");
// construct a hyperlink from the 2 data elements of record in table
echo ("<a href=$line[1]>$line[0]</a>");
echo (
"</td>");
echo (
"</tr>");
}

// end table
echo ("</table>");

// close result set and connection
mysql_free_result($row_count);
mysql_close();
?>
Chao...
__________________
...Definitivamente Soy Nadie entre los Sabios....*-*Capuleto*-*