john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

dbshowdbtables

<?php
/*
session_start();
if(!session_is_registered('member_ID')) :
header('Location: index.php');
endif;
//faster but has limitations mysql_unbuffered_query($sql,$con);
*/
?>

<?php
include 'dbinfo.php';
include 'dbconnect.php';

echo "MySQL: " . mysql_get_server_info($dbconn);
echo "<br><br>\n";

echo "SHOW DATABASES<br>\n";
$response = mysql_query("SHOW DATABASES",$dbconn);
while ($row = mysql_fetch_assoc($response))
{    echo $row['Database'] . "<br>\n";  }
echo "<br>\n";


echo "SHOW TABLES<br>\n";
$response = mysql_query("SHOW TABLES",$dbconn);
while ($row = mysql_fetch_row($response))
{    echo $row[0] . "<br>\n";  }
echo "<br>\n";


$response = mysql_query("SHOW DATABASES",$dbconn);
print_r(mysql_fetch_array($response));
echo "<br>\n";

$sql = "SHOW TABLES";
$response = mysql_query($sql,$dbconn);
print_r(mysql_fetch_array($response));
echo "<br>\n";

mysql_close($dbconn);
?>

  • « dbupdate
  • dbselectall »

Published

Feb 6, 2010

Category

web

~66 words

Tags

  • dbshowdbtables 1
  • web 56