fix query
This commit is contained in:
@@ -2494,7 +2494,7 @@ long LoginWrenchPromoAccount( CVars in, CVars &out ){
|
||||
load_db_record( p, "SELECT md5('%s') AS password_md5, 'NG' AS country ", in["password"].c_str());
|
||||
|
||||
if ( load_db_record(y, "SELECT firstname , lastname , middlename , status,email FROM market_import WHERE uid::text ='%s' AND status = 1", in["promo_owner"].c_str())> 0){
|
||||
if ( load_db_record(out, "SELECT id FROM members WHERE LOWER(username) = LOWER('%s')", x["username"].c_str())> 0){
|
||||
if ( load_db_record(out, "SELECT id FROM members WHERE LOWER(username) = LOWER('%s')", y["username"].c_str())> 0){
|
||||
out["status_message"] = "INVALID_LINK";
|
||||
return PHP_API_BAD_PARAM;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ logfmt(logINFO, "WrenchMarketImport()");
|
||||
try {
|
||||
out["total_record"] = "0";
|
||||
const PGresult *res;
|
||||
res = pgsql_query("SELECT id AS import_id,* FROM market_import WHERE status =1 LIMIT 10");
|
||||
res = pgsql_query("SELECT id AS import_id,* FROM market_import WHERE status =1 ORDER BY ecount ASC LIMIT 10");
|
||||
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
out["total_record"] = pgsql_num_rows(res);
|
||||
|
||||
Reference in New Issue
Block a user