yii能直接输出sql语句吗解决办法

WBOY
Release: 2016-06-13 11:46:54
Original
1028 people have browsed it

yii能直接输出sql语句吗
不用日志功能,直接输出sql语句可以吗
------解决方案--------------------
如果你是dao方式,是可以直接输出的,如果是ar,那你必须通过日志功能,但是你可以安装yii yiidebugtoolbar,这个很好用的,配置方便。
------解决方案--------------------
yii yiidebugtoolbar
使用这个,调试一步到位。
------解决方案--------------------
去看底层  好像是CCommand吧  我记得底层是按attributes拼接成 sql执行 当时看了下 并没有深入  如果楼主研究出来了麻烦告知下

Related labels:
source:php.cn
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template