removed out var
This commit is contained in:
@@ -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++) {
|
||||
map<const char*, const char*>f = 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{
|
||||
|
||||
Reference in New Issue
Block a user