gdtv 发表于 2011-6-7 11:34:52

怎么获取$this->db构造出来的sql语句?

本帖最后由 gdtv 于 2011-6-7 17:42 编辑

$this->db->where
$this->db->order_by
$query= $this->db->get
.............
.............
1、怎么查看本次$this->db构造出来的sql语句?
2、怎么查看整个页面执行过的所有sql语句呢?

jeongee 发表于 2011-6-7 11:44:40

1.
   执行前用:
   echo $this->db->_compile_select();
执行后:
echo $this->db->last_query();
2.http://codeigniter.org.cn/user_guide/general/profiling.html
页: [1]
查看完整版本: 怎么获取$this->db构造出来的sql语句?