CI框架常用函数(AR数据库操作的常用函数)

这篇博客介绍了CodeIgniter PHP框架中AR(Active Record)数据库操作的常用函数,包括查询、增加、更改、删除记录,缓存管理,结果处理以及辅助查询功能,如插入ID、受影响行数等。
摘要由CSDN通过智能技术生成

用户手册地址:
http://codeigniter.org.cn/user_guide/index.html

1、查询表记录
$this->db->select(); //选择查询的字段
$this->db->select_max();
$this->db->select_min();
$this->db->select_avg();
$this->db->select_sum();
$this->db->from(); //选择表名
$this->db->join();
$this->db->get(); //得到查询结果
$this->db->get_where();
$this->db->where();
$this->db->or_where();
$this->db->where_in();
$this->db->or_where_in();
$this->db->where_not_in();
$this->db->or_where_not_in();
$this->db->like();
$this->db->or_like();
$this->db->not_like();
$this->db->or_not_like();
$this->db->group_by();
$this->db->distinct();
$this->db->having();
$this->db->or_having();
$this->db->order_by();
$this->db->limit();
$this-

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值