html - how to make this sql statment in codeigniter framework php? -
how make sql statment in codeigniter framework php??
select count(`id`) `c` `products` `valid` = 1 , `sticky` = 2 how make in model
like way
$this->db->get('products'); how that?
$this->db->select('count("id") c'); $this->db->where('valid',1); $this->db->where('sticky',2); $result = $this->db->get('products');
Comments
Post a Comment