摘要:
$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 = $qu... 阅读全文
木子炜培先生⑴2017底=>(年薪15万)=>31岁 ⑵2018=》(生产生活用品)并且年薪20万=>32岁 ⑶2019=>年薪30万=>把小作坊升级为工厂=>33岁 ⑷2020=>再开一个食品工厂 |
摘要:
$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 = $qu... 阅读全文
摘要:
其他文章 https://getyii.com/topic/28 阅读全文
摘要:
<div class="btn-group"> <button data-toggle="dropdown"> 默认 </button> <ul class="dropdown-menu"> <li><a href="#">功能</a></li> </ul> </div> 效果图 阅读全文
摘要:
Date.prototype.Format = function (fmt) { var o = { "M+": this.getMonth() + 1, //月份 "d+": this.getDate(), //日 "h+": this.getHours()%12==0?12:this.getHours()%12... 阅读全文
摘要:
1 我是这样做的 2 1. searchModel里面: 3 $query = Order::find()->from(['o' => Order::tableName()]); 4 $query->joinWith(['dcUser0 u', 'product0 p']); 5 2. Order model里面 6 public functi... 阅读全文
摘要:
我是这样做的 1. searchModel里面: $query = Order::find()->from(['o' => Order::tableName()]); $query->joinWith(['dcUser0 u', 'product0 p']); 2. Order model里面 pu 阅读全文
摘要:
1common\config\main.php 'components' => [ 'cache' => [ 'class' => 'yii\caching\FileCache', 'cachePath' => '@runtime/cache2', ], ], 2用法 1 $cache = Yii: 阅读全文
摘要:
class TestController extends Controller{ // 该方法会在其他方法之前执行 public function behaviors() { // 声明缓存配置 return [ // 需要注意的这里是二维数组 [ 'class' => 'yii\fi... 阅读全文
摘要:
片段缓存 片段缓存--过时间期 片段缓存--依赖dependency 循环嵌套片段缓存 阅读全文
|