added uid

This commit is contained in:
CHIEFSOFT\ameye
2023-10-21 15:01:30 -04:00
parent b9935be028
commit 6cca83bb4d
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -203,7 +203,7 @@ long MemberCouponList( CVars in, CVars &out ){
out["total_record"] = "0";
const PGresult *res;
res = pgsql_query(" SELECT id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status,ca.active "
res = pgsql_query(" SELECT id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status,ca.active,ca.uid AS allocation_uid "
" FROM coupons_allocation ca WHERE ca.member_id = %lu "
" AND %s ORDER BY ca.id DESC", in["member_id"].Long(),in["active_q"].c_str());
@@ -234,6 +234,10 @@ long MemberCouponList( CVars in, CVars &out ){
snprintf(vname, sizeof (vname), "active_%05d", i);
out[vname] = rec["active"];
snprintf(vname, sizeof (vname), "allocation_uid_%05d", i);
out[vname] = rec["allocation_uid"];
}
}
ret = PHP_API_OK;
+1
View File
@@ -455,6 +455,7 @@ class ResultFormatter extends Model
"added" => $out["added_${key}"],
"status" => $out["status_${key}"],
"active" => $out["active_${key}"],
"allocation_uid"=> $out["allocation_uid_${key}"],
'currency' => 'Naira',
'currency_code' => 'NGN'
);