Fix query
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user