Re: MySQL Schema

From: Date: Wed, 28 Mar 2001 22:02:44 +0000
Subject: Re: MySQL Schema
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45973@lists.php.net to get a copy of this message
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, KPortsmout@aol.com 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net /*****************************\ * 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------

« previous php.general (#45973) next »