Simple Database Queries - help please

Hello everyone -

Making good progress using Yii, but stumbling over what seems to be something simple -

I am trying to make a call to return some data from my Model, but I can't seem to just make a query with a simple column parameter


I have a Articles model and I want to make a query that will return a list of articles written by a particular user.

basically - SELECT * FROM articles WHERE author = UserID

How do I accomplish this with Yii?

I have had success calling specific entries to a table (using findByPk(#)), but I cannot seem to accomplish the database call described above

Any help would be appreciated.


Take a look here:


or here:


try this