i may be wrong, but i think this is done behind the scenes allready when
you use placeholders like ? or :xy.
i think this is mentioned in the zend_db manual somewhere on top.
so just don't try to quote the $whereArray, that looks not ok.
best regards,
Steven Truppe
debussy007 wrote:
> 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!
>