![](../../assets/img/logsbig.PNG)
COUNSELLING CASES REPORT BETWEEN AND
AGE GORUP |
GENDER |
SCHOOLING |
VIST |
|
FEMALE |
MALE |
TOTAL |
IS-SCH |
OUT-SCH |
TOTAL |
NEW |
OLD |
TOTAL |
|
prepare("SELECT DATECREATED,
CASE
WHEN AGE1 BETWEEN 10 AND 14 THEN '10-14'
WHEN AGE1 BETWEEN 15 AND 19 THEN '15-19'
WHEN AGE1 BETWEEN 20 AND 24 THEN '20-24'
WHEN AGE1 > 24 THEN 'Over 24'
END AS age_range,
sum( if( SEX = 'FEMALE', RECORDCOUNTER, 0 ) ) AS FEMALEA,
sum( if( SEX = 'MALE', RECORDCOUNTER, 0 ) ) AS MALEA,
sum( if( SCHOOLING = 'IS', RECORDCOUNTER, 0 ) ) AS insc,
sum( if( SCHOOLING = 'OS', RECORDCOUNTER, 0 ) ) AS ossc
FROM hct_counselling_andtesting
WHERE DATECREATED BETWEEN :a AND :b GROUP BY age_range ASC");
$result->bindParam(':a', $d1);
$result->bindParam(':b', $d2);
$result->execute();
for($i=0; $row = $result->fetch(); $i++){
?>
|
|
|
|
|
|
|
|
|
|
TOTAL |
prepare("SELECT sum(RECORDCOUNTER) FROM hct_counselling_andtesting WHERE SEX = 'FEMALE' AND
DATECREATED BETWEEN :a AND :b AND AGE_GROUP = '10-14' ");
$results->bindParam(':a', $d1);
$results->bindParam(':b', $d2);
$results->execute();
for($i=0; $rows = $results->fetch(); $i++){
$dsdsd=$rows['sum(RECORDCOUNTER)'];
echo formatMoney($dsdsd, true);
}
?> |
prepare("SELECT sum(RECORDCOUNTER) FROM hct_counselling_andtesting WHERE SEX = 'MALE'
AND DATECREATED BETWEEN :c AND :d ");
$resultia->bindParam(':c', $d1);
$resultia->bindParam(':d', $d2);
$resultia->execute();
for($i=0; $cxz = $resultia->fetch(); $i++){
$zxc=$cxz['sum(RECORDCOUNTER)'];
echo formatMoney($zxc, true);
}
?>
|
prepare("SELECT sum(RECORDCOUNTER) FROM hct_counselling_andtesting WHERE DATECREATED BETWEEN :c AND :d ");
$resultia->bindParam(':c', $d1);
$resultia->bindParam(':d', $d2);
$resultia->execute();
for($i=0; $cxz = $resultia->fetch(); $i++){
$zxc=$cxz['sum(RECORDCOUNTER)'];
echo formatMoney($zxc, true);
}
?>
|
prepare("SELECT sum(RECORDCOUNTER) FROM hct_counselling_andtesting WHERE SCHOOLING = 'IS' AND DATECREATED BETWEEN :c AND :d ");
$resultia->bindParam(':c', $d1);
$resultia->bindParam(':d', $d2);
$resultia->execute();
for($i=0; $cxz = $resultia->fetch(); $i++){
$zxc=$cxz['sum(RECORDCOUNTER)'];
echo formatMoney($zxc, true);
}
?>
|
prepare("SELECT sum(RECORDCOUNTER) FROM hct_counselling_andtesting WHERE SCHOOLING = 'OS' AND DATECREATED BETWEEN :c AND :d ");
$resultia->bindParam(':c', $d1);
$resultia->bindParam(':d', $d2);
$resultia->execute();
for($i=0; $cxz = $resultia->fetch(); $i++){
$zxc=$cxz['sum(RECORDCOUNTER)'];
echo formatMoney($zxc, true);
}
?>
|
prepare("SELECT sum(RECORDCOUNTER) FROM hct_counselling_andtesting WHERE DATECREATED BETWEEN :c AND :d ");
$resultia->bindParam(':c', $d1);
$resultia->bindParam(':d', $d2);
$resultia->execute();
for($i=0; $cxz = $resultia->fetch(); $i++){
$zxc=$cxz['sum(RECORDCOUNTER)'];
echo formatMoney($zxc, true);
}
?>
|
prepare("SELECT sum(RECORDCOUNTER) FROM hct_counselling_andtesting WHERE VISTTYPE = 'NEW' AND DATECREATED BETWEEN :c AND :d ");
$resultia->bindParam(':c', $d1);
$resultia->bindParam(':d', $d2);
$resultia->execute();
for($i=0; $cxz = $resultia->fetch(); $i++){
$zxc=$cxz['sum(RECORDCOUNTER)'];
echo formatMoney($zxc, true);
}
?>
|
prepare("SELECT sum(RECORDCOUNTER) FROM hct_counselling_andtesting WHERE VISTTYPE = 'REVIST' AND DATECREATED BETWEEN :c AND :d ");
$resultia->bindParam(':c', $d1);
$resultia->bindParam(':d', $d2);
$resultia->execute();
for($i=0; $cxz = $resultia->fetch(); $i++){
$zxc=$cxz['sum(RECORDCOUNTER)'];
echo formatMoney($zxc, true);
}
?>
|
prepare("SELECT sum(RECORDCOUNTER) FROM hct_counselling_andtesting WHERE DATECREATED BETWEEN :c AND :d ");
$resultia->bindParam(':c', $d1);
$resultia->bindParam(':d', $d2);
$resultia->execute();
for($i=0; $cxz = $resultia->fetch(); $i++){
$zxc=$cxz['sum(RECORDCOUNTER)'];
echo formatMoney($zxc, true);
}
?>
|