Closed robotccm closed 8 years ago
Original comment by Sylvain Robez-Masson (Bitbucket: srobez-masson, ).
In fact, Ting use pg_query_params in all case not pg_send_prepare. But the Postgres driver seems to fail if you insert multiple query with pg_query_params without params.
Original comment by Yannick Le Guédart (Bitbucket: Torgan, GitHub: Torgan).
So the solution seems to be : replace line 205 in Ting/Driver/Pgsql/Driver :
if ([] === $values) {
$this->result = pg_query($this->connection, $sql);
} else {dump($values);
$this->result = pg_query_params($this->connection, $sql, $values);
}
Original comment by Xavier Leune (Bitbucket: [Xavier Leune](https://bitbucket.org/Xavier Leune), ).
Merged in master
Original report by Yannick Le Guédart (Bitbucket: Torgan, GitHub: Torgan).
I'm trying to execute the following SQL statement using ting :
No params, so I'm just using getQuery since I do not wish a prepared one (using Symfony3 and ting-bundle in a command) :
Unfortunately, it looks like ting is using a prepared query, which can't be done with multiple commands :