mySQL Table information display
mySQL
Download (.zip)
<?php $db = "1book"; $table = "_info";
$link = mysql_connect("localhost","root","pass") or die("Couldn't connect to MySQL");
mysql_select_db($db , $link) or die("Couldn't open $db");
$result = mysql_query("SELECT * FROM $table") or die("SELECT Error");
$num_rows = mysql_num_rows($result);
echo "There are $num_rows records.<P>";
while ($get_info = mysql_fetch_row($result)) { foreach ($get_info as $field) { echo "\t$field<BR>"; } echo "<BR>";
}
mysql_close($link); ?>
|