tester l'interrogation d'une bdd MySQL
Bonsoir,
je souhaite refaire fonctionner un site codé il y a plus de 3 ans. Premièrement, j'ai remplacé les fonctions MySQL_xxx par PDO. Comme ça ne fonctionne pas, je teste l'interrogation de la bdd en essayant d'afficher les différentes tables. Mais page blanche alors que avec PHPMyAdmin, je vois qu'il y a 7 tables, donc je fais certainement une erreur, mais je ne vois pas ; voici mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
<?php
error_reporting(E_ALL);
ini_set('display_errors','1');
include_once("connect_pdo.php");
include_once("config.php");
$id_conn = connect();
$sql='show tables';
$qid = $bdd->query($sql);
while( $row=$qid->fetch(PDO::FETCH_NUM) )
{
echo $row[0]."<br>";
...
?> |