Hi. I’m new in PHP world and I have some doubts. My main question is how can I get the data from an administrator for a situation update? I have two tables for user data:
table ‘Admin’: idAdmin
table ‘User’: idUser, Name, Email, Password, etc…
The two tables are linked as follows: idAdmin = idUser
When an admin want to change your data, I have to get the data from User where idUser is equals to idAdmin, but how do I this condition in php? I was doing:
$condition=new CDbCriteria;
$condition->condition='User::model()->idUser=:Admin::model()->idAdmin AND User::model()->idUser=:$this->$id';
$model=$this->loadModel($condition);
this $model is from table ‘game’, but the value ‘category’ is from table ‘Category’ and the value ‘username’ is from table ‘Users’.And how I put that values here?