Answers for "how to set sql_mode for a query in CI model"

SQL
0

how to set sql_mode for a query in CI model

$this->db->query('SET SESSION sql_mode = ""');

// ONLY_FULL_GROUP_BY
$this->db->query('SET SESSION sql_mode =
                  REPLACE(REPLACE(REPLACE(
                  @@sql_mode,
                  "ONLY_FULL_GROUP_BY,", ""),
                  ",ONLY_FULL_GROUP_BY", ""),
                  "ONLY_FULL_GROUP_BY", "")');
Posted by: Guest on June-27-2021

Code answers related to "how to set sql_mode for a query in CI model"

Code answers related to "SQL"

Browse Popular Code Answers by Language