On Sat, Jul 11, 2009 at 19:57, Govinda<govinda.webdnat...@gmail.com> wrote:
> I have been using PEAR's tableInfo() to remind myself about the columns in
> the table..  but now I want to see as much data as possible about the table
> and its contents *without* using PEAR.   (I.e. just using built in stuff for
> mysqli.)

    This is not mysqli_#() directly, but just mocked up here in this
email.  Not guaranteed to work, but should give you the right idea at
least.  ;-P

<?php
include('inc/config.php'); // Your configuration
include('inc/db.php'); // Your database connection info

$sql = "SHOW TABLES";

$result = mysql_query($sql);

foreach(mysql_fetch_assoc($result) as $k => $v) {
        $ssql = "DESCRIBE ".mysql_real_escape_string($v);
        $rresult = mysql_query($ssql);
        echo "<b>".$k."</b>:<br />\n";
        echo "<pre>\n";
        print_r(mysql_fetch_assoc($rresult));
        echo "</pre>\n";
        echo "<br />\n";
}
?>


-- 
</Daniel P. Brown>
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to