Backend Service
This commit is contained in:
@@ -501,7 +501,7 @@ long getMemberReminders(CVars in, CVars &out) {
|
||||
|
||||
out["total_record"] = "0";
|
||||
|
||||
const PGresult *res = pgsql_query("SELECT *,start_date::date AS start_date_formatted,end_date::date AS end_date_formatted FROM members_reminders WHERE member_id = %lu AND status = 1 ORDER BY start_date ASC", in["member_id"].Long());
|
||||
const PGresult *res = pgsql_query("SELECT *,start_date::date AS start_date_formatted,end_date::date AS end_date_formatted, (CASE WHEN reminder=0 THEN 'Notification' WHEN reminder=1 THEN 'Notification + Email' WHEN reminder=2 THEN 'Email Only' ELSE 'Not Known' END) AS reminder_text FROM members_reminders WHERE member_id = %lu AND status = 1 ORDER BY start_date ASC", in["member_id"].Long());
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
out["total_record"] = pgsql_num_rows(res);
|
||||
|
||||
@@ -530,6 +530,9 @@ long getMemberReminders(CVars in, CVars &out) {
|
||||
snprintf(vname, sizeof (vname), "reminder_%05d", i);
|
||||
out[vname] = rec["reminder"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "reminder_text_%05d", i);
|
||||
out[vname] = rec["reminder_text"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "status_%05d", i);
|
||||
out[vname] = rec["status"];
|
||||
|
||||
|
||||
@@ -198,8 +198,8 @@ function processOutJson($in, $out) {
|
||||
"description" => $out["description_${key}"],
|
||||
"reminder" => $out["reminder_${key}"],
|
||||
"start_date" => $out["start_date_${key}"],
|
||||
"end_date" => $out["end_date_${key}"]
|
||||
|
||||
"end_date" => $out["end_date_${key}"],
|
||||
"reminder_text" => $out["reminder_text_${key}"]
|
||||
);
|
||||
} // "request_id"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user