Issues

ZF-7748: Zend_Db_Adapter_Abstract update method

Description

When trying to update a db row with an associative array, I always see a question mark ? instead of the value I insert into a column.

I examined the code and I saw, that line 572 on the Zend_Db_Adapter_Abstract.php contains the following code: if ($this->supportsParameters('positional')) { ...

öhm what sense does it make? the returned value is always true which inserts the question mark. As far as I have read the docs, you propagate the update of rows by giving the update method an associative array with the values... This makes no sense for me, either you give the supportsParameters method a parameter which the user could set from outside or you remove it. I could never get into the else part of the if in line 572.

I am not sure, but I could be horribly wrong, please delete this request if so.

Best regards the smartie bowl.

Comments

Profiler returns me the sql queries with question marks instead of returning me the queries which where sent to the sql server.

It sounds like you are simply looking at a parameterised query, using bound parameters instead of quoting them.

If you can produce some code to make it clear the circumstances that this is produced, it would be helpful to see if there is actually an issue here, or that you are simply missing the bind parameters from the profiler.

'supportsParameters' is something that is set inside the actual adapter that the developer can use to determine if the adapter and driver in question actually supports positional or named parameters, thus, its not something a developer can set.