打印出最后执行的mysql 语句
2016-04-08 10:46
543 查看
db.php 文件中添加
public function getlastsql(){
return $this->sql;
}
入口文件中添加,公共方法
function getlastsql(){
include '../cmstop/framework/factory.php';
$db = & factory::db();
return $db->getlastsql();
}
function mylog1($input){
$file = '../mylog1.txt';
file_put_contents($file,'执行时间:'.date('Y-m-d H:i:s',time())."\n".$input."\n\n",FILE_APPEND);
}
public function getlastsql(){
return $this->sql;
}
入口文件中添加,公共方法
function getlastsql(){
include '../cmstop/framework/factory.php';
$db = & factory::db();
return $db->getlastsql();
}
function mylog1($input){
$file = '../mylog1.txt';
file_put_contents($file,'执行时间:'.date('Y-m-d H:i:s',time())."\n".$input."\n\n",FILE_APPEND);
}
相关文章推荐
- mac安装mysql
- Mysql 设置字段自动获取当前时间
- mysql导入导出.sql文件备份还原数据库
- Windows MySQL5.7安装和配置
- MySQL插入数据
- MySQL双主环境搭建
- MySQL ・ 引擎特性 ・ InnoDB 文件系统之文件物理结构
- mysql启动
- 关于WAMP中mysql服务突然不能启动的解决方案
- mysql5.5.48的my.cnf配置
- mysql5.5.48的my.cnf配置
- mysql中的表复制
- MySQL中的varchar(N)
- MySQL数据库 安装图解
- mysql灵活分页存储过程
- mysql存储引擎
- MySQL ・ 物理备份 ・ Percona XtraBackup 备份原理
- MySQL绿色版 官网下载+安装(win7)
- IT忍者神龟之MySQL函数详细描述
- IT忍者神龟之MySQL数据库简单操作