Answers for "codeigniter group_by"

PHP
0

group by codeigniter 3

$this->db->group_by(array("title", "date"));  
// Produces: GROUP BY title, date
Posted by: Guest on July-05-2021
1

where group codeigniter

$this->db->select('*')->from('my_table')
        ->group_start()
                ->where('a', 'a')
                ->or_group_start()
                        ->where('b', 'b')
                        ->where('c', 'c')
                ->group_end()
        ->group_end()
        ->where('d', 'd')
->get();

// Generates:
// SELECT * FROM (`my_table`) WHERE ( `a` = 'a' OR ( `b` = 'b' AND `c` = 'c' ) ) AND `d` = 'd'
Posted by: Guest on October-05-2020

Browse Popular Code Answers by Language