>
> How do you run the file?? Using any IDE or??
>
<?php
include $_SERVER['DOCUMENT_ROOT'].'/includes/database-connect.php'; //Connects
to database
$database = new Connection();
$database = $database->Connect();
$statement = $database->Prepare("SELECT COUNT(Membership_Level_Name) AS
MemTotal, Membership_Level_Name
FROM membership AS M
LEFT JOIN membership_levels AS L
ON M.`Membership_Level_Id` =
L.`Membership_Level_Id`
LEFT JOIN membership_status AS S
ON M.`MembershipStatusId` =
S.MembershipStatusId
WHERE M.`MembershipStatusId` = 1
GROUP BY L.`Membership_Level_Name`
ORDER BY L.`Membership_Level_Id`
");
$statement->execute();
$MembershipTotals = $statement->fetchall(PDO::FETCH_OBJ);
if (!empty($MembershipTotals)) {
foreach ($MembershipTotals as $MembershipTotal) {
$data[0][] = array(
"cols" => array("Membership_Level_Name"=>"", "label"=>"Membership
Level", "type"=>"string"),
array("MemTotal"=>"", "label"=>"Total", "pattern"=>""
, "type"=>"number"),
"rows" => array($MembershipTotal->Membership_Level_Name,
$MembershipTotal->MemTotal)
);
}
}
echo json_encode($data);
--
DISCLAIMER:
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system. If you are not the intended recipient
you are notified that disclosing, copying, distributing or taking any
action in reliance on the contents of this information is strictly
prohibited.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.