In yii, I pull the data out of the database as follows:
$record=User::model()->findByAttributes(array('login'=>$this->username));
If done:
echo '<pre>';print_r($record);echo '</pre>';
That displays:
[_attributes:CActiveRecord:private] => Array ( [id] => 1 [login] => Myname [passwd] => 123456 [created] => 0000-00-00 00:00:00 )
How to use this array? (I need an id
to assign to $a
).
PS As I tried it better not to show you :)