记 codeIgniter3.1

codeIgniter3.1

// 1. 查询
$q = $this->db->from($this->table)->where($where)->get()```
$res = $q->result();// 这里最后得到的是一个对象 这个是所有的
$res = $q->row_array();// 获取一条数据 类似tp的find得到的数据
	
// 2.打印sql
$sql = $this->db->last_query();

jquery data table

$('#table').dataTable( {
    
    
   "lengthChange": true,// 页数大小
   "searching": true,// 搜索
   "bInfo": true,// 详情(第 1 - 4 条 / 共 4 条数据)
   "lengthMenu": [[5, 10, 15, -1], [5, 10, 15, "All"]],// 页数大小 前面是值 后面是显示
   "oLanguage": {
    
    // 汉化
       "sLengthMenu": "每页显示 _MENU_ 条记录",
       "sZeroRecords": "对不起,没有匹配的数据",
       "sInfo": "第 _START_ - _END_ 条 / 共 _TOTAL_ 条数据",
       "sInfoEmpty": "没有匹配的数据",
       "sInfoFiltered": "(数据表中共 _MAX_ 条记录)",
       "sProcessing": "正在加载中...",
       "sSearch": "全文搜索:",
       "oPaginate": {
    
    
           "sFirst": "第一页",
           "sPrevious": " 上一页 ",
           "sNext": " 下一页 ",
           "sLast": " 最后一页 "
       }
   }
});

猜你喜欢

转载自blog.csdn.net/weixin_44475312/article/details/105537225