Ver Mensaje Individual
  #3 (permalink)  
Antiguo 07/05/2007, 13:00
Avatar de el cirujano
el cirujano
 
Fecha de Ingreso: mayo-2003
Ubicación: Frente al PC
Mensajes: 609
Antigüedad: 21 años
Puntos: 3
Re: leer tablas en php

Código PHP:
<?php
$dbname 
'mysql_dbname';

if (!
mysql_connect('mysql_host''mysql_user''mysql_password')) {
    echo 
'Could not connect to mysql';
    exit;
}

$result mysql_list_tables($dbname);

if (!
$result) {
    echo 
"DB Error, could not list tables\n";
    echo 
'MySQL Error: ' mysql_error();
    exit;
}

while (
$row mysql_fetch_row($result)) {
    echo 
"Table: $row[0]\n";
}

mysql_free_result($result);
?>
este ejemplo estaba en el manual de mysql_list_tables
__________________
CSS2 + AJAX + PHP + MySQL, una mezcla sin competencia!!!!!!