family birtday
This commit is contained in:
@@ -496,12 +496,19 @@ long WrenchFamilyUpdate(CVars in, CVars &out){
|
||||
REQ_STRING(in, "firstname", 2, 34, "(.*)");
|
||||
REQ_STRING(in, "lastname", 2, 34, "(.*)");
|
||||
REQ_STRING(in, "family_uid", 2, 50, "(.*)");
|
||||
REQ_LONG(in, "year", 1, -1);
|
||||
REQ_LONG(in, "month", 1, -1);
|
||||
CVars x;
|
||||
x["firstname"] = in["firstname"];
|
||||
x["firstname"].set_valid(true);
|
||||
x["lastname"] = in["lastname"];
|
||||
x["lastname"].set_valid(true);
|
||||
|
||||
x["year"] = in["year"];
|
||||
x["year"].set_valid(true);
|
||||
x["month"] = in["month"];
|
||||
x["month"].set_valid(true);
|
||||
|
||||
const PGresult *res = pgsql_query(" SELECT id AS family_id FROM members_family "
|
||||
" WHERE member_id=%lu AND uid='%s' ", member_id,in["family_uid"].c_str());
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user