Re: [PDO] Bug# 48856 - binding multiple parameters with the same name
[email protected] (Lukas Kahwe Smith) Mon, 16 Nov 2009 18:00:13 +0000
| Newsgroups | php.pdo |
|---|---|
| Message-ID | <[email protected]> |
On 16.11.2009, at 13:41, Dan Scott wrote: > I thought I should bring this bug up to the list: http://bugs.php.net/48856 > > """ > My PDO Statement seems to bind multiple parameters of the same name > even > though the PDO->Prepare documentation indicates that this should fail: > "You cannot use a named parameter marker of the same name twice in a > prepared statement." > """ > > I'm not in a position to provide any direction on this bug, so perhaps > someone involved in the current design discussions would be interested > in assuming ownership of it? Yeah, I stumbled over this a few times before too. Afaik it works with prepared statement emulation, but I do not remember which drivers do not support this in native mode (probably any of those that support named parameters natively .. like pgsql, oracle etc.). In theory we should also be able to emulate this even in native mode, since we have code to rewrite between the oracle and the question mark syntax (though this code probably could use a rewrite since it doesnt deal with single quoted content all that well). regards, Lukas Kahwe Smith [email protected]