Answers for "code ignoter query"

PHP
3

get result count codeigniter

public function record_count() {
   return $this->db->count_all("tablename");
}
Posted by: Guest on November-02-2020
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

Code answers related to "code ignoter query"

Browse Popular Code Answers by Language