From f203267c96cabe615393a0f337b3841d92e3fb0e Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Mon, 18 Nov 2024 13:42:44 -0500 Subject: [PATCH] out["status"] = "OK"; --- wrenchboard/src/shared_tool/market.cc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/wrenchboard/src/shared_tool/market.cc b/wrenchboard/src/shared_tool/market.cc index e7f362ba..9045ae56 100644 --- a/wrenchboard/src/shared_tool/market.cc +++ b/wrenchboard/src/shared_tool/market.cc @@ -85,19 +85,16 @@ long WrenchPromoGetMember( CVars in, CVars &out ) " WHERE admin_id = %lu AND uis = '%s' ",admin_id,in["member_uid"].c_str()); if (res != NULL && pgsql_num_rows(res) > 0) { - out["total_record"] = pgsql_num_rows(res); - - - mapf = pgsql_fetch_assoc(res, 0); - if (f.empty()) continue; - CVars rec; - map_to_cvars(f, rec); - out = rec; - ret = PHP_API_OK; + mapf = pgsql_fetch_assoc(res, 0); + CVars rec; + map_to_cvars(f, rec); + out = rec; + ret = PHP_API_OK; + out["status"] = "OK"; } - ret = PHP_API_OK; - out["status"] = "OK"; + } catch (bad_parameter) { + out["status"] = "ERROR"; logfmt(logINFO, "ERROR CALL long WrenchPromoGetMember(CVars in, CVars &out)"); }