I have a controller where I make a database query and then pass that data into a view. In the view I have a zii.widgets.grid.CGridView where I loop through the data and display it in a table.
Everything works great, however I would to put a heading above the table using a piece of data from the query. I don’t know how to do it.
My query pulls data from two tables via left join:
Select t1.id, t1.name, t2.description from t1 left join t2.id on t2.id = t1.id where...
How do I display the first result of the t2.description data in the view?
I tried the following:
$dataProvider->data['description'][0]
But this does not work.