Issues

ZF-7748: Zend_Db_Adapter_Abstract update method

Issue Type: Bug Created: 2009-09-01T10:40:59.000+0000 Last Updated: 2009-09-17T14:13:35.000+0000 Status: Resolved Fix version(s): Reporter: Arpad Fodor (smartiebowl) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db

Related issues: Attachments:

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

Posted by Arpad Fodor (smartiebowl) on 2009-09-02T04:38:48.000+0000

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

Posted by Ryan Mauger (bittarman) on 2009-09-02T04:52:49.000+0000

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.

Posted by Ralph Schindler (ralph) on 2009-09-17T14:13:34.000+0000

'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.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts