how to set sql mode for a query in ci model

Solutions on MaxInterview for how to set sql mode for a query in ci model by the best coders in the world

showing results for - "how to set sql mode for a query in ci model"
Tony
15 Jan 2016
1$this->db->query('SET SESSION sql_mode = ""');
2
3// ONLY_FULL_GROUP_BY
4$this->db->query('SET SESSION sql_mode =
5                  REPLACE(REPLACE(REPLACE(
6                  @@sql_mode,
7                  "ONLY_FULL_GROUP_BY,", ""),
8                  ",ONLY_FULL_GROUP_BY", ""),
9                  "ONLY_FULL_GROUP_BY", "")');
10
similar questions