Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

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", "")');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #query #CI #model
ADD COMMENT
Topic
Name
7+3 =