cancel offer

This commit is contained in:
CHIEFSOFT\ameye
2024-06-29 23:02:03 -04:00
parent 8901c0d640
commit 5b34da28b9
+2 -2
View File
@@ -301,7 +301,7 @@ long WrenchJobPostCancelOffer(CVars in, CVars &out){
try {
REQ_LONG(in, "member_id", 1, -1);
long offer_result = REQ_LONG(in, "offer_result", 1, -1);
//long offer_result = REQ_LONG(in, "offer_result", 1, -1);
REQ_STRING(in, "offer_code", 1, 15, "(.*)");
long job_id = 0;
long owner_member_id = 0;
@@ -311,7 +311,7 @@ long WrenchJobPostCancelOffer(CVars in, CVars &out){
CVars outx;
// rc = 0 + load_db_record( out, "SELECT * FROM members_jobs_offer WHERE offer_code='%s' AND status = 1", in["offer_code"].c_str() );
const PGresult *res = pgsql_query("SELECT *,member_id AS owner_member_id, id AS offer_id "
" FROM members_jobs_offer WHERE offer_code='%s' AND status = 1", in["offer_code"].c_str());
" FROM members_jobs_offer WHERE offer_code='%s' AND status = 1 AND member_id = %lu", in["offer_code"].c_str(), in["member_id"].Long());
if (res != NULL && pgsql_num_rows(res) > 0) {
// now job is valid