Problems Executing DB query

Hello All,

I am trying to run a simple query without a model or controller.

what I have so far is:


$storage = Yii::app()->db->createCommand()

	  						->select('storage_size')

							->from('pin_storage')

							->where('storage_user_id=:id', array(':id'=>$user_id))

							->queryRow();



When I run this the query executes no problem but $storage is an empty array.

What am I doing wrong?

Thanks

Hey I actually figured this out.

I used Gii to create a model to go along with my table.

Then I used


 $userStorage = Storage::model()->find("storage_user_id='1'");

	  $storageSpace = $userStorage->storage_size;

to get the parameter I needed.