时间:2021-07-01 10:21:17 帮助过:9人阅读
方法二:(直接拼写sql语句)
$sql = "select * from `usho_community_mail` where date_format(`created_at`,‘%Y%m‘) = date_format(curdate() ,‘%Y%m‘) AND `com_id`=$id AND `is_deleted`=0 "; $modelCommunityMail = Yii::$app->db->createCommand($sql)->queryAll();
[moka学习笔记]yii2.0数据库查询的多种方法(未完待整理)
标签: