yii---where该如何使用

简单示例yii 的where使用方法:

$where = ['post_id'=>$postId];
//$list = ForumThreadPost::find()->where($where)->all();
$list = ForumThreadPost::find()->where($where)->one();
$list->post_num += 1;
$list->save();

 

posted @ 2018-11-21 16:17  帅到要去报警  阅读(453)  评论(0编辑  收藏  举报