MySQL group_concat_max_len in a query

后端 未结 5 1367
春和景丽
春和景丽 2021-02-05 16:27

I\'m searching a way to insert this

SET GLOBAL group_concat_max_len=15000

in an existing SQL query such as the following:

SELECT *         


        
5条回答
  •  孤街浪徒
    2021-02-05 16:55

    CI3 Example, you cant combine them, but you can execute a seperate query, such as:

    public function myModelFunction($id){
    
    //set mysql session variable
    $this->db->query("SET @@group_concat_max_len = 2048;");
    
    //actual query
    $query= $this->db->query("").....
    

提交回复
热议问题