Open greenbea opened 5 months ago
You have to set the sql_mode. Try
new PDO($dsn, "opensips", "opensipsrw", array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET sql_mode="ANSI_QUOTES"'));
Hi @greenbea! I just pushed a new branch for working on this issue (bugfix/fix-dashboard-postgres), with a preliminary fix, inspired by the discussion so far. Could you please check that commit / approach and see if it fixes the dashboard on your Postgres setup?
In short, there are lots of PDO
objects being created from various db.inc.php
files, and I've tried to only create the "dashboard" connection with ANSI_QUOTES
SQL mode, so we don't break other code by "fixing" things here.
The backtick works fine for mysql but breaks for postgres. Mysql supports double quotes too for identifiers .https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_ansi_quotes.