You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT "tags"."id" AS "id" FROM "tags" WHERE "id" = :where1
1
SELECT "tags"."id" AS "id" FROM "tags" WHERE "id" = :where2
PDO EXCEPTION: SQLSTATE[HY093]: Invalid parameter number: :where1
as we see, in next call we have :where2 instead :where1
so, for Select Object we have ever-increased number postfix for named parameter markers: where1, where2, etc...
But for sqlite is Ok, because Zend\Db\Sql\Platform\Platform has Select decorator for sqlite, and Platform object was re-instantiated for each 'validation call', and in this case we have that $this->instanceParameterIndex reset each time
:)
I am not sure that it is must be fixed on zend-db side, looks like better implement some alternative approach for validator :)
Custom modification in method for debug: https://github.com/zendframework/zend-validator/blob/master/src/Db/AbstractDb.php#L321
test case:
result:
as we see, in next call we have
:where2
instead:where1
Originally posted by @AndrejAndb at zendframework/zend-validator#178
The text was updated successfully, but these errors were encountered: