Home >Backend Development >PHP Tutorial >cakephp prints the code of the sql statement_PHP tutorial

cakephp prints the code of the sql statement_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 14:58:08911browse

cakephp prints the code of sql statement

Copy the following statement into your code, you can print out all the sql statements before this:

Copy to ClipboardLiehuo.Net CodesQuoted content: [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;

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/363916.htmlTechArticlecakephp prints the code of the sql statement. Copy the following statement into your code to print out all the previous statements. SQL statement: Copy to Clipboard Quoted content: [www.veryhuo.com] $...
Statement:
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