Substitue named parameter multiple times in a single query
Bilge opened this issue · comments
Bilge commented
Currently parameter substitution for named parameters only works if the name is substituted exactly once per name. However, there seems to be no technical reason why the same name cannot or should not be used multiple times, and indeed, this is supported by PDO.
yield $this->connection->execute(
'INSERT foo
SET Alfa=:Alfa,
Bravo=:Bravo,
Charlie=:Bravo
ON DUPLICATE KEY UPDATE
Bravo=:Bravo,
Charlie=:Bravo
',
[
'Alfa' => 1,
'Bravo' => 2,
]
);
Notice: Undefined index: Bravo in ConnectionStatement.php line 130