It looks like it ought to work, although not exactly as I've described it -
you need to bind the values in fetchAll. From the comments in
Zend/Db/Table/Select.php
* // alternatively, with named binding
* $select->where('id = :id');
* </code>
*
* Note that it is more correct to use named bindings in your
* queries for values other than strings. When you use named
* bindings, don't forget to pass the values when actually
* making a query:
*
* <code>
* $db->fetchAll($select, array('id' => 5));
* </code>
*
Although I have to say a quick test here isn't immediately working for me,
even with placeholder.
Otherwise build the query as a string and use quoteInto(), which I agree
isn't 'sleek'.
>
> Pretty sure you can use named bindings:
> $table->select()->where( 'SHA1( CONCAT( :salt, ip ) ) = :ip',
> array('salt'=>$salt, 'ip' => $data['ip' ] ) );
>
Hmm, no I wish. :-(
--
View this message in context:
http://www.nabble.com/Multiple-placeholders-in-select%28%29-%3Ewhere%28%29-clause--tp22161067p22165062.html
Sent from the Zend Framework mailing list archive at Nabble.com.