cvs: pear /LiveUser_Admin/Storage SQL.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Wed, 15 Dec 2004 06:20:32 +0000 |
| Subject: | cvs: pear /LiveUser_Admin/Storage SQL.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-27421@lists.php.net to get a copy of this message | ||
dufuz Wed Dec 15 01:20:32 2004 EDT
Modified files:
/pear/LiveUser_Admin/Storage SQL.php
Log:
ooops forgot to commit, added selectCol
http://cvs.php.net/diff.php/pear/LiveUser_Admin/Storage/SQL.php?r1=1.8&r2=1.9&ty=u
Index: pear/LiveUser_Admin/Storage/SQL.php
diff -u pear/LiveUser_Admin/Storage/SQL.php:1.8 pear/LiveUser_Admin/Storage/SQL.php:1.9
--- pear/LiveUser_Admin/Storage/SQL.php:1.8 Tue Dec 14 18:40:03 2004
+++ pear/LiveUser_Admin/Storage/SQL.php Wed Dec 15 01:20:32 2004
@@ -43,7 +43,7 @@
*
* @author Lukas Smith <smith@backendmedia.com>
* @author Bjoern Kraus <krausbn@php.net>
- * @version $Id: SQL.php,v 1.8 2004/12/14 23:40:03 lsmith Exp $
+ * @version $Id: SQL.php,v 1.9 2004/12/15 06:20:32 dufuz Exp $
* @package LiveUser
* @category authentication
*/
@@ -212,6 +212,30 @@
return $this->queryOne($query, $type);
}
+ function selectCol($table, $field, $filters)
+ {
+ if (empty($field)) {
+ $this->_stack->push(
+ LIVEUSER_ADMIN_ERROR_QUERY_BUILDER, 'exception',
+ array('reason' => 'field is missing')
+ );
+ }
+
+ if (empty($table)) {
+ $this->_stack->push(
+ LIVEUSER_ADMIN_ERROR_QUERY_BUILDER, 'exception',
+ array('reason' => 'table is missing')
+ );
+ }
+
+ $query = 'SELECT ';
+ $query .= $this->alias[$field];
+ $type = $this->fields[$field];
+ $query .= "\n" . 'FROM ' . $this->prefix . $table;
+ $query .= $this->createWhere($filters);
+ return $this->queryCol($query, $type);
+ }
+
function selectAll($fields, $filters, $orders, $rekey, $limit, $offset, $root_table,
$selectable_tables)
{
if (!is_array($fields) || empty($fields)) {