Help for a Yii newbie :)

It’s pretty simple for Yii masters, but seeing as I’m a newbie, I’d really appreciate your help :)

I have a table with a couple of columns, and one particular column is Product_Type. It’s ENUM, so it’s either an Apparatus or Chemical. So it’s one table, but I have to display the apparatus and the chemicals separate ly. Advice, tips, help please?

Where do you want display this difference?

Post your code.

I don’t have a code just of yet, because I’m blank on how to go about it for now.

Just on a simple page. Yii’s test app, to be specific. Like I said, it’s pretty simple. It’s different in that on the menu bar there’s “Manage Chemicals” and “Manage Apparatus”. Both pages will display tables from phpmyAdmin. One table in the database, but it shows up as two separate tables on the site according to it’s product_type :)

// in your model define a static property


public static $PRODUCT_TYPES = array(





// then you can access the static property and it will return the array


Hi! Thanks for the response. Can you walk me through? So I define that in my model, right? Is it usable with Gii? Cos I still need the basic operations to be done on the "two" tables.