family uid

This commit is contained in:
CHIEFSOFT\ameye
2023-11-21 07:45:24 -05:00
parent 508c1dd47d
commit 39c9f89a04
2 changed files with 10 additions and 4 deletions
+2 -2
View File
@@ -133,7 +133,7 @@ long RecoOffersInterest(int itm_count, CVars in, CVars &out ){
int ic = itm_count;
long member_id = REQ_LONG(in, "member_id", 1, -1);
res = pgsql_query(" SELECT mo.* FROm members_offer_interest mo LEFT JOIN members_jobs_offer mj ON mj.id= mo.offer_id"
" WHERE mj.member_id = %lu AND mj.expire > now()",member_id);
" WHERE mj.member_id = %lu AND mj.expire > now() AND mo.status = 1",member_id);
if (res != NULL && pgsql_num_rows(res) > 0) {
snprintf(vname, sizeof (vname), "title_%05d", ic);
@@ -394,7 +394,7 @@ long RecoPendingInterestCount( int itm_count, CVars in, CVars &out ){
long member_id = REQ_LONG(in, "member_id", 1, -1);
res = pgsql_query("SELECT moi.*,mjo.expire FROM members_offer_interest moi LEFT JOIN members_jobs_offer mjo ON mjo.id = moi.offer_id "
" LEFT JOIN members_jobs j ON j.id= mjo.job_id "
" WHERE moi.member_id = %lu AND mjo.expire > now() AND j.status= 1",member_id);
" WHERE moi.member_id = %lu AND mjo.expire > now() AND j.status= 1 AND moi.status = 1",member_id);
if (res != NULL && pgsql_num_rows(res) > 0) {
snprintf(vname, sizeof (vname), "title_%05d", ic);