Zend_DB and Zend_DB->query()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Zend_DB and Zend_DB->query()

Ramon de la Fuente
Hi there,

I'm new to the list and I just spent a good 30 minutes finding out why I
had an error in query:
*Fatal error*: Uncaught exception 'PDOException' with message
'SQLSTATE[HY093]: Invalid parameter number: no parameters were bound'

$db = Zend_Db::factory()

Turns out I had a question-mark in the data, which automatically turns
into a placeholder even if you don't add a replacement array parameter.
Is this intended?

Also, replacing the $db>query() with $db->insert(), I found that my
column names (array_keys) get renamed without underscores.
Again, is this intended?

I read on the Roadmap that help is needed on the Zend_Db component -
id'd be willing to contribute.


Ramon de la Fuente