cancel offer
This commit is contained in:
@@ -301,7 +301,7 @@ long WrenchJobPostCancelOffer(CVars in, CVars &out){
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
REQ_LONG(in, "member_id", 1, -1);
|
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, "(.*)");
|
REQ_STRING(in, "offer_code", 1, 15, "(.*)");
|
||||||
long job_id = 0;
|
long job_id = 0;
|
||||||
long owner_member_id = 0;
|
long owner_member_id = 0;
|
||||||
@@ -311,7 +311,7 @@ long WrenchJobPostCancelOffer(CVars in, CVars &out){
|
|||||||
CVars outx;
|
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() );
|
// 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 "
|
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) {
|
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||||
|
|
||||||
// now job is valid
|
// now job is valid
|
||||||
|
|||||||
Reference in New Issue
Block a user