This topic is locked
[SOLVED]

 Chart XML Error

9/30/2011 8:20:22 PM
PHPRunner General questions
S
stiven author

[size="4"]

Hello, Im getting an XML Parser error when trying to do a chart this is the error " XML Parser failure: The element type must be terminated by the matching eng-tag" the SQL is correct because i get the result when i run the query. This error happens because on the label field where it says format i put custom view because i want to display the name of the month and not the number, the query actually gets the number of the month so in custom view i tried to change that this is what i did:


//this is the query

SELECT

COUNT(`fecha_actual`) AS CASES,

MONTH(`fecha_actual`) AS `Month`,

YEAR(`fecha_actual`) AS `Year`

FROM `vital_info`

GROUP BY MONTH(`fecha_actual`)
// this is in custom view
$month_number = $data["Month"];/// i tried here with $data['Month']; and $data['fecha_actual']; none worked
if ($month_number == "1"){

$month = "Enero";

}

else if ($month_number == "2"){

$month = "Febrero";

}

else if ($month_number == "3"){

$month = "Marzo";

}

else if ($month_number == "4"){

$month = "Abril";

}

else if ($month_number == "5"){

$month = "Mayo";

}

else if ($month_number == "6"){

$month = "Junio";

}

else if ($month_number == "7"){

$month = "Julio";

}

else if ($month_number == "8"){

$month = "Agosto";

}

else if ($month_number == "9"){

$month = "Septiembre";

}

else if ($month_number == "10"){

$month = "Octubre";

}

else if ($month_number == "11"){

$month = "Noviembre";

}

else if ($month_number == "12"){

$month = "Diciembre";

}
$value = $month;


Can anyone help me with this?

[/size]