Last active
October 16, 2017 15:11
-
-
Save Bizunow/7769dbe0d507d4311bf3b8b8dd4afe0a to your computer and use it in GitHub Desktop.
[Yii create command example] #php #yii
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yii::app()->db->createCommand('DELETE FROM table WHERE id = :id')->execute([ | |
':id' => $item->user_id | |
]); | |
Yii::app()->db->createCommand('SELECT FROM table WHERE id = :id')->queryAll(true, [ | |
':id' => $item->user_id | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment