Closed francoisjacquet closed 1 month ago
The PDO::query()
function both prepares and executes an SQL statement.
So there is no need to call the PDOStatement::execute()
function, and the following line should be removed from the code in the message above:
$stmt->execute();
Description
I am trying to use the
pdo_mysql
PHP extension with emulation of prepared statements disabled.The code is equivalent to the following:
The following error is returned:
Here are the SQL modes set in MariaDB 10.11.6:
The same query is fine when
PDO::ATTR_EMULATE_PREPARES => true
or when run from the MariaDB console.Please note, the SQL query is not a prepared statement.
Please also note,
transcript_grades
is a VIEW.I am filing a bug report as I received no answer on DBA stackexchange. Please bear with me if this is not an actual driver bug.
PHP Version
PHP 8.3.10
Operating System
Debian bookworm