Relations / Joining Confusion

Hi

I am having some trouble figuring out relations and joining between Models.

I have two tables.

sim_card_pool (Model: SimCardPool) and numbers_pool (Model: NumbersPool)

sim_card_pool has a column "number_pool_id" which references the PK id in the numbers_pool table.

On display, currently, it returns the id stored in the number_pool_id column, I would like it to return the "number" column from the numbers_pool table.

Any advise would be greatly appreciated.

Many thanks.

http://www.yiiframework.com/doc/guide/1.1/en/database.arr