From bb620b7f8364bb145c363693b90dc49c5c5812bf Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 28 Nov 2024 10:46:43 -0500 Subject: [PATCH] removed out var --- wrenchboard/src/shared_tool/site_crons.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wrenchboard/src/shared_tool/site_crons.cc b/wrenchboard/src/shared_tool/site_crons.cc index c4462116..ee7665e5 100644 --- a/wrenchboard/src/shared_tool/site_crons.cc +++ b/wrenchboard/src/shared_tool/site_crons.cc @@ -288,13 +288,11 @@ long ReferEmailsCleanup(){ char vname[30]; long ret = PHP_API_BAD_PARAM; out["total_record"] = "0"; - const PGresult *res, *resF; + const PGresult *res; // check if pending res = pgsql_query("SELECT id, email ,added, status FROM members_refer_friend WHERE status =1 AND added < now() + '-14 days' LIMIT 20"); if (res != NULL && pgsql_num_rows(res) > 0) { - out["total_record"] = pgsql_num_rows(res); - for (int i = 0, n = pgsql_num_rows(res); i < n; i++) { mapf = pgsql_fetch_assoc(res, i); if (f.empty()) continue; @@ -304,7 +302,6 @@ long ReferEmailsCleanup(){ const PGresult *res1 = pgsql_query("SELECT * FROM members WHERE email='%s'", rec["email"].c_str()); if (res1 != NULL && pgsql_num_rows(res1) > 0) { - out["status"] = "Unable to add this email"; pgsql_query("UPDATE members_refer_friend SET status = 5 WHERE status = 1 AND email = '%s' AND id=%lu", rec["email"].c_str(), rec["id"].Long()); } else{