Google Charts records issue

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
User avatar
bruceholt
Veteran Member
Posts: 100
Joined: 2016-07-30 20:16
Location: Australia

Google Charts records issue

Post by bruceholt » 2021-01-21 20:27

I am trying to add a Google chart to my homepage which I have managed to get working but it is showing data on the chart from every user.

I have tried to add a check to get the member ID but it is still showing every users data.

Code: Select all

<?php
$connection = mysqli_connect('localhost', 'root', '', 'farmrex');
$result = mysqli_query($connection, "SELECT
    DATE_FORMAT(expense_date, '%b') AS month,
    SUM(cost) AS total
FROM
    expenses
left join membership_userrecords on pkValue=expenses.id
WHERE
    expense_date > NOW() - INTERVAL 12 MONTH
	and memberID='".getLoggedMemberID()."'
GROUP BY
    YEAR(expense_date), MONTH(expense_date)");
//if($result){
//    echo "CONNECTED";
//}
?>

Post Reply