Re: [rfc] new getTables Pear DB method

From: Date: Fri, 26 Oct 2001 00:25:24 +0000
Subject: Re: [rfc] new getTables Pear DB method
References: 1  Groups: php.pear.dev php.pear.general 
Request: Send a blank email to pear-dev+get-2387@lists.php.net to get a copy of this message
A "show views" and "show users" functionality may be in the main interest also. ----- Original Message ----- From: "Tomas V.V.Cox" <cox@idecnet.com> To: "PEAR DEV" <pear-dev@lists.php.net>; <pear-general@lists.php.net> Sent: Friday, October 26, 2001 2:18 AM Subject: [PEAR] [rfc] new getTables Pear DB method > I plan to implement this func for Pear DB (read more about the > initiative in pear-general), to get an array with the tables contained > in the selected database. > > ## Proto ## > > common.php: > array getTables(); > > drivers: > string _getTablesQuery(); > > ## Implementation (quick) ## > > function getTables() > { > return $this->getCol($this->_getTablesQuery); > } > > function _getTablesQuery() > { > return "show tables"; > } > > ## Usage ## > > $tables_array = $db->getTables(); > > > ## More? ## > > If you find useful, I could add also a extra param: getTables([bool > $show_rows=false]), that could return also the number of rows per table > when set to true. > > Please tell me your ideas or die with that :-). > > > Tomas V.V.Cox > > PS.- This msgs is crossposted in pear-dev and pear-general as there is > the main interest for this. > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, e-mail: pear-general-unsubscribe@lists.php.net > For additional commands, e-mail: pear-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.pear.dev (#2387) next »