Yii 1.0 Query Builder Code Demo II

{Code}

$usersO = Yii::app()->db->createCommand()
      ->select()
      ->from('user')
      ->where(array('like','login_name', array('%b%')))
      ->order('uid DESC')
      ->limit(1)
      ->offset(2)
      ->queryAll();
$usersT = Yii::app()->db->createCommand()
      ->selectDistinct('user_status')
      ->from('user')
      ->where(array('in','uid',array(1,2,3,4,5,6,7)))
      ->order('uid DESC')
      ->queryAll();      

 

{Boy Say}

This is my self-practice code.