jowen, please use code tag (button with <> on the toolbar) to format your code to be more readable. Thank you…
CSQLDataProvider returns you nothing else then just a simple PHP’s associative array, where all the data is organised exactly as in your database. That is, first level (keys) are all records and second level is a particular record.
So, if you want to get category in your example, all you have to is write something like that:
foreach($dataProvider->getData() as $data)
{
print_r($data['category']);
}
(written from memory, not tested, but should work)
BTW: You’re using:
$dataProvider = $model->getSales()
which suggest, that in the return you should get CActiveDataProvider rather than CSQLDataProvider, but I’m not sure…