<?php
include("mysql_dialog.php");
$host="localhost"; // Your MySQL Host
$user="root"; // Your MySQL User
$pass=""; // Your MySQL Password
$dbase="test"; // Name of your MySQL Database
$sql="show tables"; // SQL String to send to the Database Server
$db=new mysql_dialog("1"); // with "1" possible errors will be printed
$db->connect($host,$user,$pass,$dbase);
$db->onscreen($sql);
$db->speak($sql);
while ($out=$db->listen()){
for ($x=0; $x<$db->fields; $x++){
echo $out[$x]."<br>";
}
}
echo "Number of rows: ".$db->rows."<br>";
echo "Number of fields: ".$db->fields."<br>";
?>
|