Home > php教程 > php手册 > cakephp 打印 sql 语句的代码

cakephp 打印 sql 语句的代码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:40:28
Original
1271 people have browsed it

cakephp 打印 sql 语句的代码

将以下语句复制到你的代码中,可以打印出在这之前所有的sql语句:

Copy to Clipboard引用的内容:[www.bkjia.com] $sources = ConnectionManager::sourceList();
if (!isset($logs)):
$logs = array();
foreach ($sources as $source):
$db =& ConnectionManager::getDataSource($source);
if (!$db->isInterfaceSupported('getLog')):
continue;
endif;
$logs[$source] = $db->getLog();
endforeach;
endif;
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template