Tom Shaw-4 wrote:
>
> How do I use Zend_DB_Table to add multiple AND conditions using
> quoteInto().
> Ive tried several different methods and the only way I can do it is with a
> raw query string. Below are several examples that do not work. Example two
> somebody recommended and does not work, I can see the raw query using
> Zend_Profiler_Firebug it appends an extra AND condition when it's not
> needed.
Can't you use table select?
$table = new Bugs();
$select = $table->select();
$select->where('bug_status = ?', 'NEW')
->where('account_name = ?', 'Bob');
$rows = $table->fetchAll($select);
Explained on the manual page:
http://framework.zend.com/manual/en/zend.db.table.html (13.5.8. Querying for
a Set of Rows).
Adding multiple where clauses should, I believe (as it's based on
Zend_Db_Select), add AND to the clause.
Simon
-----
Simon
http://www.ajb007.co.uk/
--
View this message in context:
http://www.nabble.com/quoteInto%28%29-Question-tp22747185p22762371.html
Sent from the Zend Framework mailing list archive at Nabble.com.