cvs: pear /Auth/Container DB.php

From: Date: Sat, 15 Nov 2003 13:37:27 +0000
Subject: cvs: pear /Auth/Container DB.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-14283@lists.php.net to get a copy of this message
yavo Sat Nov 15 08:37:27 2003 EDT Modified files: /pear/Auth/Container DB.php Log: Changed the query in fetchData to go around the DB::oci8 prepare problem Index: pear/Auth/Container/DB.php diff -u pear/Auth/Container/DB.php:1.39 pear/Auth/Container/DB.php:1.40 --- pear/Auth/Container/DB.php:1.39 Mon Oct 13 04:08:45 2003 +++ pear/Auth/Container/DB.php Sat Nov 15 08:37:26 2003 @@ -16,7 +16,7 @@ // | Authors: Martin Jansen <mj@php.net> | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.39 2003/10/13 08:08:45 yavo Exp $ +// $Id: DB.php,v 1.40 2003/11/15 13:37:26 yavo Exp $ // require_once 'Auth/Container.php'; @@ -30,7 +30,7 @@ * * @author Martin Jansen <mj@php.net> * @package Auth - * @version $Revision: 1.39 $ + * @version $Revision: 1.40 $ */ class Auth_Container_DB extends Auth_Container { @@ -236,7 +236,12 @@ else{ $sql_from = $this->options['usernamecol'] . ", ".$this->options['passwordcol'].$this->options['db_fields']; } - + /** + Old Style, removed to go around the oci8 + problem + See bug 206 + http://pear.php.net/bugs/bug.php?id=206 + $query = "SELECT ! FROM ! WHERE ! = ?"; $query_params = array( $sql_from, @@ -244,7 +249,13 @@ $this->options['usernamecol'], $username ); - $res = $this->db->getRow($query, $query_params, DB_FETCHMODE_ASSOC); + */ + + $query = "SELECT ".$sql_from. + " FROM ".$this->options['table']. + " WHERE ".$this->options['usernamecol']." = '".$this->db->quoteString($username)."'"; + + $res = $this->db->getRow($query, null, DB_FETCHMODE_ASSOC); if (DB::isError($res)) { return PEAR::raiseError($res->getMessage(), $res->getCode());

« previous php.pear.cvs (#14283) next »