Problem To Getting Multiple Record From Mysql Db


I use this query to get my meals records. I have 2 rows in my meals table but it return me only one row

[sql]$meals = Yii::app()->db->createCommand()

	            ->select('m.meal_id, mb.first_name, mb.last_name, m.breakfast, m.lunch, m.dinner, m.added_datetime')

	            ->from('member mb')

	            ->join('meal m', 'mb.member_id= m.member_id')

	            ->where('mb.is_active=:status and mb.mess_id=:mess_id', 







need help :( please…

CDbCommand::queryRow() returns one row by design. Try queryAll().

Thanks a lot for you help :) I did not know about queryAll().

But my where condition is not working if i use this queryAll(). so what i should to do right now…?

Thanks again…

What does ‘not working’ mean? Still getting only one record? Now getting no records? It’s no longer an Object?

thank you for your kindness jkofsky.

i have a is_active field in my member table so i want to get those member’s record whose is_active=1. but this queryAll() returned me all members whose is_active = 1 and 0 too. this is the problem.