cvs: pear /LiveUser_Admin/Storage SQL.php
| From: | Lukas Smith | Date: | Tue, 07 Feb 2006 10:38:41 +0000 |
| Subject: | cvs: pear /LiveUser_Admin/Storage SQL.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38029@lists.php.net to get a copy of this message | ||
lsmith Tue Feb 7 10:38:41 2006 UTC
Modified files:
/pear/LiveUser_Admin/Storage SQL.php
Log:
- added support for '*' in fields list as an alias to fetch all fields in the root table
http://cvs.php.net/viewcvs.cgi/pear/LiveUser_Admin/Storage/SQL.php?r1=1.52&r2=1.53&diff_format=u
Index: pear/LiveUser_Admin/Storage/SQL.php
diff -u pear/LiveUser_Admin/Storage/SQL.php:1.52 pear/LiveUser_Admin/Storage/SQL.php:1.53
--- pear/LiveUser_Admin/Storage/SQL.php:1.52 Sun Feb 5 10:28:48 2006
+++ pear/LiveUser_Admin/Storage/SQL.php Tue Feb 7 10:38:41 2006
@@ -57,7 +57,7 @@
* @author Bjoern Kraus <krausbn@php.net>
* @copyright 2002-2005 Markus Wolff
* @license http://www.gnu.org/licenses/lgpl.txt
- * @version CVS: $Id: SQL.php,v 1.52 2006/02/05 10:28:48 lsmith Exp $
+ * @version CVS: $Id: SQL.php,v 1.53 2006/02/07 10:38:41 lsmith Exp $
* @link http://pear.php.net/LiveUser_Admin
*/
@@ -364,6 +364,9 @@
{
if (!is_array($fields) || empty($fields)) {
$fields = array_keys($this->tables[$root_table]['fields']);
+ } elseif (($key = array_search('*', $fields)) !== false) {
+ unset($fields[$key]);
+ $fields = array_merge($fields,
array_keys($this->tables[$root_table]['fields']));
}
$types = array();