Today encountered disease Strider classmate proposed Medoo insert method can not insert database problem, I tested the discovery is possible
and insert INTO "T_user" (username) VALUES (' Test '); This statement is always impossible to execute, and Medoo always helps you to enclose the database's table with double quotes but cannot execute on the command line. And then I couldn't figure out why Medoo could do it, and found a problem.
SET Sql_mode=ansi_quotes is in effect
We inserted the whole insert method and this method is in line 833.
$this,exec$this->table_quote ($tableimplode$columns implode($values, ', '). ‘)‘);
Method calls the Exec method to execute SQL, while the Exec method in the 183-line core code is
$this->pdo->exec($query);
The core is done by $this->pdo, so how is this thing defined?
Define assignments in 137 rows
The commands variable is required to be executed and originates from
This will set the link to Sql_mode
The command line demo effect is as follows
Medoo Database Insertion Issues