NingerJohn
可以直接用Query来实现搜索吗?
- NingerJohn 赞了评论
基础版的给的demo中,关于登陆这块,有一个规则是一个函数的调用,没有包括
- NingerJohn 赞了评论
CRequiredValidator 的别名
Yii2中不带C这种,CRequiredValidator 这种都是Yii1的。 - NingerJohn 赞了回答
用andOnCondition()可以满足。
return $this->hasMany(Spu::className(),['sku' => 'sku'])->andOnCondition(['sku.account' => 'spu.account']);
- NingerJohn 赞了教程Yii项目开发总结
- NingerJohn 评论了教程 Yii项目开发总结
写得不错,简单并容易理解
- NingerJohn 赞了回答
在config中配置如下内容即可,望采纳:
`
'db' => array('class' => 'CDbConnection', 'connectionString' => 'mysql:host=localhost;port=13306;dbname=phpac', 'username' => 'root', 'password' => '123456',
),
`