Re: HELP: Re: Table comments

From: Date: Sat, 27 Oct 2001 19:42:05 +0000
Subject: Re: HELP: Re: Table comments
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-72583@lists.php.net to get a copy of this message
<?php $db = mysql_connect('localhost','user','password'); mysql_select_db('database', $db); $sql = 'SHOW TABLE STATUS LIKE table_name'; $result = mysql_query($sql); // Only returning 1 row, but I put it in a while() loop in case the result is empty // Then I don't get any errors. while ($data = mysql_fetch_array($result)) {
       $table_comment = $data['Comment'];
} mysql_free_result($result); mysql_close($db); echo $table_comment; ?> Mike jtjohnston wrote:
In my phpadmin, I have something called: "Table comments". Can I acccess this somehow? Can't find it in the function database.
I've tried this since, but can't get syntax right: <?php $myconnection = mysql_pconnect("localhost","",""); mysql_select_db("",$myconnection); $rows = mysql_query("SHOW TABLE STATUS from MyTable LIKE Comment"); echo "$rows"; ?> I'm still new to this. A post & reply would be appreciated, Thanks, John


« previous php.general (#72583) next »