Re: Display all information from table?

From: Date: Mon, 14 Aug 2000 18:38:35 +0000
Subject: Re: Display all information from table?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-11671@lists.php.net to get a copy of this message
If you are using mysql, you can use the function mysql_field_name() and its friends. You need to give it the id of the SQL query result. This is implemented in phplib (http://phplib.netuse.de/) in the DB_Sql::metadata() function, but I think only for MySQL. Look also in the source code for phpMyAdmin. HTH, Matt ---------------------------------------------------------------- Matthew Leingang 617/495-2171 Harvard University leingang@math.harvard.edu Department of Mathematics "This signature needs no quote." On Mon, 14 Aug 2000, James Montz wrote: > PHP Newbie here, > > How do I automate the display of all information given a freeform SQL > Query and db name? > > Im trying to create a simple PHP3 page in which I can choose database > to perform query on, and just enter a freeform SQL query (e.g. SELECT > * from accounting WHERE user="gumby") > > From all I have seen, you typically specify the column names in that > particular table. But since I want the ability to choose from any > table, this wont work. > > Any help is greatly appreciated! > > Thank you in advance. >

« previous php.general (#11671) next »