active record

Hi all

I think I have a problem

when I run a query with active record

var_dump the result is the attached file

but I just want:

array(9) {


    string(1) "0"


    string(16) "TOTAL PROVINCIAL"


    string(6) "104453"


    string(5) "99101"


    string(6) "116640"


    string(5) "65446"


    string(5) "61006"


    string(5) "64595"


    string(6) "511241"


This brings me memory problems when the query returns a lot of data

the code


   echo '<pre>';


   echo '<pre>';

try this:

function __debug ($data, $text='') {

	if (is_array($data) && count ($data) > 0 && ($data[0] instanceof CActiveRecord)) {

	  foreach ($data as $d) {

	    $tmp[] = $d->attributes;


	  $data = $tmp;


	elseif ($data instanceof CActiveRecord) {

		$data = $data->attributes;


  echo '<pre>';


   echo '<pre>';