|
|
|
|
Bonjour,
|
A partir de MySQL 5 , tu peux interroger la base information_schema
johand@horus:~$ mysql -p information_schema Enter password: <cut/> Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 13 to server version: 5.0.22-Debian_3-log <cut/> mysql> select T.table_name from tables T where T.table_schema='a2a'; +-------------------------+ | table_name | +-------------------------+ | _seq | | _seq_seq | | a2a_contacts | | a2a_dnsid_has_contact | | a2a_domain_has_contact | | a2a_domain_has_nsgroup | | a2a_domains | | a2a_licensee_has_onsite | | a2a_nsgroups | | a2a_ogone_trans | | sites | +-------------------------+ 11 rows in set (0.01 sec) mysql> select table_name, table_type, engine from information_schema.tables where table_schema='a2a' order by table_name desc; +-------------------------+------------+--------+ | table_name | table_type | engine | +-------------------------+------------+--------+ | _seq_seq | BASE TABLE | MyISAM | | _seq | BASE TABLE | MyISAM | | sites | BASE TABLE | MyISAM | | a2a_ogone_trans | BASE TABLE | MyISAM | | a2a_nsgroups | BASE TABLE | InnoDB | | a2a_licensee_has_onsite | BASE TABLE | MyISAM | | a2a_domain_has_nsgroup | BASE TABLE | InnoDB | | a2a_domain_has_contact | BASE TABLE | InnoDB | | a2a_domains | BASE TABLE | InnoDB | | a2a_dnsid_has_contact | BASE TABLE | InnoDB | | a2a_contacts | BASE TABLE | InnoDB | +-------------------------+------------+--------+ 11 rows in set (0.03 sec) Voir la documentation http://mysql.com/doc/refman/5.0/fr/information-schema.html Johan Gates gave you the windows. GNU gave us the whole house.(Alexandrin) |
Bon alors je vais essayer d'être plus précis...:)
<a href="$nomdetable.php">, pour afficher tout ce qui se trouve dans la table. en fait ce que j'aimerais, c'est créer un lien si tel tabl existe.... c'est possible??? |
Salut,
|
Re,
|
Salut,
<?php
$connexion = mysql_connect('localhost','root','azertyuiop13579');
mysql_select_db('blog',$connexion);
$mysql_result = mysql_query("SHOW TABLES;",$connexion);
while ($ligne = mysql_fetch_row($mysql_result)){
echo "<a href=\"http://localhost/$ligne[0].php\">$ligne[0]</a></br>";
}
?>
Et voila le résultat http://cjoint.com/?inbvVrTMvR Pour les liens il faut encore écrire de code pour pouvoir afficher le contenu des tables. Et ce que j'ai en ligne de commande pour confirmation mysql> use blog; Database changed mysql> show tables; +-----------------+ | Tables_in_blog | +-----------------+ | dc_categorie | | dc_citations | | dc_comment | | dc_connected | | dc_gday | | dc_link | | dc_log | | dc_passcat | | dc_ping | | dc_post | | dc_session | | dc_simpleviewer | | dc_user | +-----------------+ 13 rows in set (0,00 sec) mysql>lami20j |
Re, c'est encore encore moi .... :)
|