listData() friendly input from an SQL query

Hi,

I have this sql query:




        $connection=Yii::app()->db;

        $sql='SELECT DISTINCT f.film_id, title

              FROM tbl_film AS f

              INNER JOIN tbl_showing AS s

              ON f.film_id=s.film_id

              WHERE s.start_date = :startdate

              ORDER BY title ASC;';

        

        $command=$connection->createCommand($sql);

        $start_;

        $command->bindParam(":startdate",$start_date,PDO::PARAM_STR);

        $row=$command->queryAll();



And want the output to be used in this:


$filmlist=CHtml::listData($row,'film_id','title');

Anyone know who I could change the format of what’s outputted so listData function will accept it.

Please help, thanks.

Solved. I wasn’t using queryAll, just queryRow

Updated post and fixed.