fix err
This commit is contained in:
@@ -311,6 +311,7 @@ long family_email(long mailtype, CVars in, CVars &out) {
|
||||
" LEFT JOIN members_family f ON f.family_member_id = s.member_id "
|
||||
" LEFT JOIN members m ON m.id=f.member_id WHERE s.id = %lu", in["suggest_id"].Long())) {
|
||||
vars2form(x, form);
|
||||
form.LetStr("subject", "You have recieved a task suggestion!");
|
||||
form.LetStr("email", x["parent_email"].c_str());
|
||||
form.Email("FAMILY/family_suggest_task.mailfile");
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ long WrenchSuggestList(CVars in, CVars &out){
|
||||
out["total_record"] = "0";
|
||||
// res = pgsql_query("SELECT id FROM family_task_suggestion WHERE status=1 ");
|
||||
// out["total_record"] = pgsql_num_rows(res);
|
||||
|
||||
//ALTER TABLE members_family_suggesttask ADD remind timestamp;
|
||||
res = pgsql_query(" SELECT * FROM members_family_suggesttask WHERE member_id = %lu AND status IN ( 1,2,3,4,5) "
|
||||
" ORDER BY created DESC LIMIT %lu OFFSET %lu", member_id, limit, offset);
|
||||
|
||||
@@ -194,6 +194,10 @@ long WrenchSuggestList(CVars in, CVars &out){
|
||||
snprintf(vname, sizeof (vname), "banner_%05d", i);
|
||||
out[vname] = rec["banner"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "remind_%05d", i);
|
||||
out[vname] = rec["remind"];
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
ret = PHP_API_OK;
|
||||
@@ -229,12 +233,12 @@ long WrenchSuggestTaskStatus(CVars in, CVars &out){
|
||||
//out = rec;
|
||||
if (rec["family_uid"] != ""){ // we are sure you are a family now
|
||||
// NOW LET US FIND THIS TASK
|
||||
logfmt(logINFO, "ERROR CALL long WrenchSuggestTaskStatus- NOW LET US FIND THIS TASK");
|
||||
logfmt(logINFO, " CALL long WrenchSuggestTaskStatus- NOW LET US FIND THIS TASK");
|
||||
|
||||
const PGresult *res0 = pgsql_query("SELECT id AS suggest_id,* FROM members_family_suggesttask "
|
||||
" WHERE member_id = %lu AND uid='%s' AND status IN (1,2)", member_id, in["suggest_uid"].c_str());
|
||||
if (res0 != NULL && pgsql_num_rows(res0) > 0) {
|
||||
map<const char*, const char*>f = pgsql_fetch_assoc(res, 0);
|
||||
map<const char*, const char*>f = pgsql_fetch_assoc(res0, 0);
|
||||
CVars rec2;
|
||||
map_to_cvars(f, rec2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user