X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fdoubler_functions.php;h=b6eddaf4432c2349b6baacf6ab2f3428feb7ccb3;hp=6333ababde6c017e22cc9ef13c6eee8c8decd204;hb=0715fa7aa8e5e70bcf1d957fb09ae655c3896c4e;hpb=33989fa4a558317899c3e68cb51e1be552c4ce8e diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index 6333ababde..b6eddaf443 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -70,15 +70,21 @@ function generateDoublerTable ($userid = '0', $done = 'N', $ref = 'N', $sort = ' } // List entries - $result = SQL_QUERY("SELECT + $result = SQL_QUERY_ESC("SELECT `userid`, `refid`, `points`, `timemark` FROM `{?_MYSQL_PREFIX?}_doubler` WHERE - `completed`='".$done."' AND `is_ref`='".$ref."'".$add." + `completed`='%s' AND `is_ref`='%s'" . $add . " ORDER BY - `timemark` ".$sort." -LIMIT ".$limit, __FUNCTION__, __LINE__); + `timemark` %s +LIMIT %s", + array( + $done, + $ref, + $sort, + $limit + ), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > 0) { // List entries