Support for superscript prefixes
1) The query is not equal to and has equal
$this->db->get_where (' Host ', Array (' host ' = ' DDD ', ' id! = ' =>0))->row ();
2) 2 Table intersection
return $this->db ->select (' F.*,count (s.id) as Subtotal ')->from (' category as F ')->join (' Category S ', ' f.id=s.upid ', ' left ') ->where (' F.upid ', $upid) ->group_by (' f.id ') ->order_by (' F.sort ', ' ASC ') ->get ()->result ();
3) Multiple order_by sorting
return $this->db->select (' * ') ->from (' v_category ') ->where (' Upid ', $upid) ->order_by ( ' Sort ', ' ASC ') ->order_by (' id ', ' desc ') ->get ()->result ();
4) Single record
return $this->db->get_where (' category ', array (' id ' = $id))->row ();
5) more than one record
return $this->db->get_where (' v_category ', Array (' upid ' = + $upid))->result ();
6) Number of statistics
$this->db->where (' host ', $host)->where (' id! = ', $id)->from (' Host ')->count_all_results ();
More later, reprint please indicate from default7#zbphp.com, welcome to Exchange.