在变量之前使用" : " 是什么意思?
例如,:userId在此代码中:
public function removeUser($userId)
{
$command = Yii::app()->db->createCommand();
$command->delete(
'tbl_project_user_assignment',
'user_id=:userId AND project_id=:projectId',
array(':userId'=>$userId,':projectId'=>$this->id));
}
Run Code Online (Sandbox Code Playgroud)
这是Yii框架中的PHP,MySQL代码.