Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $model = User::findOne(['id' => 1]);
- $model = User::find('username','email')->where('id'=1)
- $model = User::find()
- ->select('column1, column2')
- ->where(['id' => $id])
- ->one();
- echo $model->column1;
- $model = User::find()->select(['username','email'])->where('id=1')->One();
- $model = User::find()->select(['username','email'])->where('id=:id', [ ':id' => 1 ])->One();
- $model = User::find()
- ->select(['column1', 'column2'])
- ->where(['id' => $id])
- ->one();
- $model = User::find()->select(['username','email'])->where('id=1')->One();
Add Comment
Please, Sign In to add comment