You are welcome Charlie :) On Fri, May 23, 2008 at 3:35 PM, Charlie Markwick <[EMAIL PROTECTED]> wrote:
> Spot on just what I needed. Many Thanks. > > Charlie > > -----Original Message----- > From: [email protected] <php_mysql%40yahoogroups.com> [mailto: > [email protected] <php_mysql%40yahoogroups.com>] On > Behalf Of aslam doctor > Sent: 23 May 2008 10:46 > To: [email protected] <php_mysql%40yahoogroups.com> > Subject: Re: [php_mysql] Showing Schema > > try this script, u have to do few modifications in connection settings & > table name > > *$conn=mysql_connect(DB_SERVER,DB_SERVER_USERNAME,DB_SERVER_PASSWORD); > mysql_select_db(DB_DATABASE) or die("database not available"); > > $table_name="member_mst"; > > $sql="desc $table_name"; > $result=mysql_query($sql)or die(mysql_error()); > > while($arrres=mysql_fetch_assoc($result)) > { > echo $arrres['Field']."<br>"; > } > * > > this way u can fetch field names & print it. I guess this is what u > want. > > On Fri, May 23, 2008 at 2:58 PM, Charlie Markwick <[EMAIL > PROTECTED]<cmdm%40southcot.com> > > > wrote: > > > It would be very useful to have a short piece of PHP that would > > trawl a table and give me a quick view of the fields names in a table. > > > Is this possible to do for both MySQL 4.x and 5.x? > > > > Charlie > > > > > > -- > A.M.Doctor > > [Non-text portions of this message have been removed] > > ------------------------------------ > > The php_mysql group is dedicated to learn more about the PHP/MySQL web > database possibilities through group learning. Yahoo! Groups Links > > > -- A.M.Doctor [Non-text portions of this message have been removed]
