Fix query

This commit is contained in:
CHIEFSOFT\ameye
2023-06-19 11:23:40 -04:00
parent 38db05a5ba
commit 32c5a3de31
+3 -2
View File
@@ -392,8 +392,9 @@ long RecoPendingInterestCount( int itm_count, CVars in, CVars &out ){
try {
int ic = itm_count;
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 WHERE moi.member_id =1 AND mjo.expire > now()",member_id);
if (res != NULL && pgsql_num_rows(res) == 0) {
res = pgsql_query("SELECT moi.*,mjo.expire FROM members_offer_interest moi LEFT JOIN members_jobs_offer mjo ON mjo.id = moi.offer_id "
" WHERE moi.member_id = %lu AND mjo.expire > now()",member_id);
if (res != NULL && pgsql_num_rows(res) > 0) {
snprintf(vname, sizeof (vname), "title_%05d", ic);
out[vname] = "We are waiting on feedback";