This commit is contained in:
2022-03-26 19:10:35 -04:00
parent de37aea2c4
commit a9b09dc416
2 changed files with 16 additions and 2 deletions
@@ -105,7 +105,7 @@ If you did not log on to your account at the time detailed above, please contact
<tr>
<td class="innerpadding bodycopy">
For all support, contact us at <a href="https://{{server_name}}/contact">https://{{server_name}}/contact</a>
For all support, contact us at <a href="{{server_name}}/contact">https://{{server_name}}/contact</a>
</td>
</tr>
<tr>
+15 -1
View File
@@ -351,7 +351,7 @@ long WrenchBoardMobileSendUserWallet(CVars in, CVars &out) {
REQ_LONG(in, "member_id", 1, -1);
out["total_record"] = "0";
const PGresult *res;
res = pgsql_query(" SELECT * FROM members_wallet WHERE member_id = %lu", in["member_id"].Long());
res = pgsql_query("SELECT w.amount,c.*,w.amount AS current_balance FROM members_wallet w LEFT JOIN currency c ON c.code=w.currency WHERE w.member_id =%lu ORDER BY c.lorder DESC", in["member_id"].Long());
if (res != NULL && pgsql_num_rows(res) > 0) {
out["total_record"] = pgsql_num_rows(res);
@@ -366,6 +366,20 @@ long WrenchBoardMobileSendUserWallet(CVars in, CVars &out) {
out[vname] = rec["amount"];
snprintf(vname, sizeof (vname), "currency_%05d", i);
out[vname] = rec["currency"];
// amount | id | code | description | symbol | action_type | lorder | current_balance
snprintf(vname, sizeof (vname), "description_%05d", i);
out[vname] = rec["description"];
snprintf(vname, sizeof (vname), "symbol_%05d", i);
out[vname] = rec["symbol"];
snprintf(vname, sizeof (vname), "action_type_%05d", i);
out[vname] = rec["action_type"];
snprintf(vname, sizeof (vname), "code_%05d", i);
out[vname] = rec["code"];
}
}
ret = PHP_API_OK;