Hi,
I am trying to select distinct value from a table.
Using the above, I get an array of Active Record. What I want is an array of distinct product category. I am aware that I need to do a loop through and build array myself.
Is there a way to just get an array of distinct product category ?
Thank you
I am trying to select distinct value from a table.
$models=Product::model()->findAll(array( 'select'=>'t.Category', 'distinct'=>true, ));
Using the above, I get an array of Active Record. What I want is an array of distinct product category. I am aware that I need to do a loop through and build array myself.
Is there a way to just get an array of distinct product category ?
Thank you