This will give you the description

  $table = 'table_name';
  $sql = "desc $table";
  $r = mysql_query();
  while($row = mysql_fetch_assoc($r))
  {
    echo implode(' :: ',$row); 
  }

This will give you the dump:

$mysqldump = '/usr/local/mysql/bin/mysqldump';
$dump = `$mysqldump -u $user -p $password -d $table`;
highlight_string($dump)


--Joe

  

On Wed, Mar 28, 2001 at 06:21:29AM -0500, [EMAIL PROTECTED] wrote:
> Hi,
> 
> Is there any way in PHP to print out the schema of my database tables?
> 
> Cheers
> Ade
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
/*****************************\
 *    Joe Stump              *
 *    www.Care2.com          *   
 *    Office: 650.328.0198   *
 *    Extension: 122         *
\*****************************/
        www.miester.org

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12 
GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
------END GEEK CODE BLOCK------


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to