members_offer_interest

This commit is contained in:
CHIEFSOFT\ameye
2023-06-23 15:23:51 -04:00
parent 98a765515f
commit 14b3cb63a9
+15 -2
View File
@@ -400,6 +400,19 @@ long WrenchReplyMessage(CVars in, CVars &out) {
return 0;
}
/*
wrenchboard=> SELECT * FROM members_messages ORDER BY id DESC LIMIT 3;
id | member_id | added | msg | status | senders_id | msg_type | memo | reply | uid
-----+-----------+----------------------------+----------------------------------------------------------+--------+------------+----------+------------+-------+--------------------------------------
172 | 4 | 2023-06-23 15:15:36.499482 | YES YES YES YES 1 2 3 4 5 6 67 7 7 5 5 5 5 5 5 76 7 7 7 | 1 | 1 | MRKTINT | R17BX6RW87 | | b30d993f-c92f-42c6-b272-d76c86e5789b
171 | 4 | 2023-06-23 15:12:53.640241 | I am testing today again | 1 | 1 | MRKTINT | R17BX6RW87 | | c7da1200-489c-47ac-923c-adfd6136dc4f
170 | 4 | 2023-06-21 12:09:38.378594 | Testing this | 1 | 1 | MRKTINT | R17BX6RW87 | | 342e13b7-809d-4d1a-882d-8db6e35a8703
(3 rows)
wrenchboard=>
*/
long WrenchMarketInterestQuestionList(CVars in, CVars &out) {
long ret = PHP_API_BAD_PARAM;
out = in;
@@ -413,7 +426,7 @@ long WrenchMarketInterestQuestionList(CVars in, CVars &out) {
REQ_STRING(in, "msg_type", 1, 15, "(.*)"); //msg_type
const PGresult *res = pgsql_query("SELECT o.*,o.member_id AS client_id,jo.offer_code "
" FROM members_offer_interest o "
" FROM members_messages o "
" LEFT JOIN members_jobs_offer jo ON jo.id=o.offer_id WHERE jo.uid='%s' AND o.uid=%lu", in["offer_uid"].c_str(), in["interest_uid"].c_str());
if (res != NULL && pgsql_num_rows(res) > 0) {
map<const char*, const char*>f = pgsql_fetch_assoc(res, 0);
@@ -452,7 +465,7 @@ long WrenchMarketInterestQuestion(CVars in, CVars &out) {
const PGresult *res = pgsql_query("SELECT o.*,o.member_id AS client_id,jo.offer_code "
" FROM members_offer_interest o "
" LEFT JOIN members_jobs_offer jo ON jo.id=o.offer_id WHERE jo.uid='%s' AND o.uid=%lu", in["offer_uid"].c_str(), in["interest_uid"].c_str());
" LEFT JOIN members_jobs_offer jo ON jo.id=o.offer_id WHERE jo.uid='%s' AND o.uid='%s'", in["offer_uid"].c_str(), in["interest_uid"].c_str());
if (res != NULL && pgsql_num_rows(res) > 0) {
map<const char*, const char*>f = pgsql_fetch_assoc(res, 0);
if (!f.empty()) {