You can just skip the step where you call quote(). For example:
$whereArray = array(
'username = ?' => $uid,
'code = ?' => $code
);
$row = $members->fetchRow($whereArray);
The fetchAll() and fetchRow() methods of the Zend_Db_Table class are
both designed to accept an array argument like the one above.
Regards,
Bill Karwin
> -----Original Message-----
> From: debussy007 [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 18, 2007 2:35 AM
> To: [email protected]
> Subject: [fw-general] beginner, quoting where in array
>
>
> Hello ,
>
> I need to use fetchRow method but I need more than one
> 'where' condition.
> I tried the code below but it is not working :
>
> $whereArray = array(
> 'username = ?' => $uid,
> 'code = ?' => $code
> );
>
> $members = new Members();
> $where = $members->getAdapter()->quote($whereArray);
> $row = $members->fetchRow($where);
>
> I see in the doc the following example:
> $where = array(
> 'bug_status = ?' => 'NEW',
> 'reported_by = ?' => 'dduck'
> );
> $rows = $table->fetchAll($where);
>
> but it's not using any mehods to quote the sql like this example :
> $where = $table->getAdapter()->quoteInto('bug_status = ?',
> 'NEW'); $rows = $table->fetchAll($where);
>
> Thank you for any clarification!
> --
> View this message in context:
> http://www.nabble.com/beginner%2C-quoting-where-in-array-tf447
> 3006s16154.html#a12753364
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>