Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

yii app db createcommand join yii1

$user = Yii::app()->db->createCommand()
    ->select('id, username, profile')
    ->from('tbl_user u')
    ->join('tbl_profile p', 'u.id=p.user_id')
    ->where('id=:id', array(':id'=>$id))
    ->queryRow();
 
PREVIOUS NEXT
Tagged: #yii #app #db #createcommand #join
ADD COMMENT
Topic
Name
2+7 =