Yii2 如何输出 sql 语句?
可以用 $model->find()->createCommand()->getRawSql();
不能带 all(). find() 它的
返回值类型是 yii\db\ActiveQuery,
而find()->all() 返回的就是数组了。
举个栗子aaarticlea/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAH+AgADASIAAhEBAxEB/8QAHAABAAEFAQEAAAAAAAAAAAAAAAECAwQFBwYI/8QAQxAAAgEDAQYEAwYEBQEHBQAAAAECAwQRBQYSITFBUQcTYXEUgZEiMlKhscEVM0LRIzRicuEkFidDRFOi8DdzdILx/8QAGQEBAAMBAQAAAAAAAAAAAAAAAAECAwQF/8QAJhEBAQEAAgICAgMBAQADAAAAAAECAxEEMRIhE0EyUWEiMwUUUv/aAAwDAQACEQMRAD8A6qAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAEggkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQBIAAAAAAAAAAAACDGq3Uact1p5XYyGzVXT/wCokcflcuuPPcaceZqtnSmqkFKLymVmNZcKCRko34dXWJapqdVIANUAAAAAACBkCQU7y7kkdyiQASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAILErinGWJSwy+0aq6pOnPKeU+TOTyOXXFnuL4nyrZxkpLK4plRr7Ktj7D5LkZ6Zfg5Zy57iNZuaqAB0KgAAAAAAAKWau5X/USNozV3X+Yl/wDOh5/n/wAI24f5Myy/koyTGsv5KMhHT4//AJxnv+VVAA3VAAAIJIAGHeVnCO7F4bXPsZUjV15OVV57nF5nLcY6y045LftVbSqzq8JvC5rJs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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAQCQBBJBJApaTWGUypplwjBFzKSrDpPPAttNPDRl4Ia7oz1xz9LzdYoMh04t5wUOjx4MzvHVpuLQK3TknjBRh9U17lfjYtNRAJBAgs3dXyaEpZxw4F81+qKc1CnCLeeeFknq1fPXf28ftftDHSbKVOnLN1Xi9xfhXd/seb8Otmp65rP8RvYOVrby3m5L783xS9e56/WNgI67f07q4uZ0WkoziuOUu3Y9lpem22lWFOzs6ahTpxSWFxfq31OnE6inNvu9T0y4pJbqWEuCXYrISwSy7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAACAAAAAAAABj1JBAFLimVAddi35cew8uPYrx6jHqR1E91R5cexKgl0KseowTJDugwGCVUgAJQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//2Q==" alt="" width="110" height="110" />
$query = User::find()
->where(['id'=>[1,2,3,4])
->select(['username'])
// get the AR raw sql in YII2
$commandQuery = clone $query;
echo $commandQuery->createCommand()->getRawSql();
$users = $query->all();
Yii2 如何输出 sql 语句?的更多相关文章
- yii2输出sql语句
yii2如何输出具体的查询的sql语句: $query = User::find() ->where(['id'=>[1,2,3,4]) ->select(['username']) ...
- IBatis.net 输出SQL语句(七)
一.IBatis.net输出SQL语句到控制台 输出IBatis.net生成的SQL语句到控制台,能够方便调试. 如果要想输出IBatis.net的SQL语句到控制台,那么只需要做如下配置即可: &l ...
- NHibernate输出SQL语句
用了NHierbate之后,很少需要写原生的SQL语句,由于总是看不到SQL语句,所以有时候对SQL调优非常不利.因此产生了让NHibernate输出它所生成的SQL语句的想法,以便于后续调优. 一. ...
- Spring3+MyBatis3整合log4j无法输出SQL语句问题的解决
今天遇到了跟下面文章一模一样的问题,下面文章的解决方案很好,在这里记录保存一下. Spring3+MyBatis3整合无法输出SQL语句问题的解决
- Ibatis.Net 输出SQL语句学习(七)
一.IBatis.net输出SQL语句 输出IBatis.net生成的SQL语句,能够方便调试. 在MapperHelper类中添加GetSql方法: /// <summary> /// ...
- Egg上层框架CabloyJS是如何输出SQL语句日志的?
背景 在Egg开发实践中,经常会遇到一个问题:如何查看刚刚执行过的Egg组装的原生SQL语句呢? 1. 现有方案 可以直接在项目的config配置文件中添加MySQL配置debug: true.这会启 ...
- Druid搭配log4j2输出SQL语句和结果
一.引言 其实Druid的内置了log4jdbc来显示SQL语句,虽然显示效果不如原生的log4jdbc效果好,但是因为内置所以不需要其他更多的配置. 二.使用 1. 创建基于druid的logger ...
- 使用Hibernate 拦截执行sql语句,并输出sql语句,获取sql语句
重建包名 org.hibernate.type.descriptor.sql 重建类BasicBinder 代码如下 package org.hibernate.type.descriptor.sql ...
- Hibernate输出SQL语句以便调试
配置方法:1.打开hibernate.cfg.xml文件编辑界面,在Properties窗口处,点击Add按钮,选择Show_SQL参数,输入值为True. *另外,如果按照同样的步骤,分别加入以下参 ...
随机推荐
- 移动端tap事件,消除300毫秒延迟
引用这个之前,要讲一下首先我是用了webpack技术,所以你的项目如果没有用到这个的话,最好不要用这个技术,当然想用也可以,改下代码也可以用. 下面的代码直接复制就可以用啦. ( function(e ...
- github 操作
https://www.cnblogs.com/cxk1995/p/5800196.html 1在已有的GitHub账号下创建项目. 2将GitHub项目克隆到本地. git clone https ...
- Flutter 中 JSON 解析
本文介绍一下Flutter中如何进行json数据的解析.在移动端开发中,请求服务端返回json数据并解析是一个很常见的使用场景.Android原生开发中,有GsonFormat这样的神器,一键生成Ja ...
- 用Canvas实现一些简单的图片滤镜
1.灰度滤镜 对于灰度滤镜的实现一般有三种算法 1) 最大值法:即新的颜色值R=G=B=Max(R,G,B),通过这种方法处理后的图片看起来亮度值偏高. 2) 平均值法:即新的颜色值R=G=B=(R+ ...
- Android——Service介绍与例子
官方定义:Service(服务)是一个没有用户界面的在后台运行执行耗时操作的应用组件.其他应用组件能够启动Service,并且当用户切换到另外的应用场景,Service将持续在后台运行.另外,一个组件 ...
- 关于浏览器兼容问题——还有移动端meta问题
<!DOCTYPE html><!--[if lt IE 7]> <html dir="ltr" lang="en-US" cla ...
- jQuery的each使用陷阱
注意:jQuery使用each()函数进行循环时发现return false不能阻止程序继续向下执行 原因如下: (1)开始还以为是jQuery的each()函数是异步执行的,所以导致出错,其实不是. ...
- PHPStorm 配置命名空间
文件-设置-Directories 选中:application 点击顶部:Sources,右侧会出现 Source Floders 配置项 点击:p进行设置 输入app\
- DotNetty 实现 Modbus TCP 系列 (三) Codecs & Handler
本文已收录至:开源 DotNetty 实现的 Modbus TCP/IP 协议 DotNetty 作为一个半成品,我们不需要关注细节的实现,只需要关注自己的业务即可,所以最主要的就是处理 Codecs ...
- Real-time chart using ASP.NET Core and WebSocket
Solution in glance The following diagram illustrates our solution where IoT device reports readings ...