On 3 Mar 2008, at 18:02, Freddie Witherden wrote:
> Hi,
>
> I am trying to use named binding with Zend_Db_Select. Looking at
> line 575 in Select.php (1.5 pre release) I am lead to believe this
> is possible. However, all of my attempts so far (with MySQL PDO)
> have failed with the following error when ->query() is called:
>
> SQLSTATE[HY093]: Invalid parameter number: no parameters were bound
>
> Looking at the generated back trace it would seem as if query()
> does not prepare a statement but actually tries to execute it. (My
> Zend_Db_Select object was from doing $db->select()).
>
> Can anyone advise me as to what course of action to take?
>
> Regards, Freddie.
Hi Freddie,
your problem may be related to one Bill helped me with the other day:
http://www.nabble.com/Using-Db_Table-%3Eselect%28%29-in-a-loop-
tp15792081s16154p15793415.html
-- I was trying to use a table select object in a prepared query
manner, but Bill recommended using a statement object instead.
(I hope it helps...)
Regards,
Carlton