X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=70721b868773fb9db75e3baf9fbdf96b34ddff26;hb=d710c67e8e92f19875c782cd6e976bee1f6eab26;hp=ec203bd135a430bff0e5eb214b2c39d67a0e294f;hpb=974fd88cbeb7ae8e4829613dcb158fe4e73f5eb0;p=mailer.git
diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php
index ec203bd135..70721b8687 100644
--- a/inc/mysql-manager.php
+++ b/inc/mysql-manager.php
@@ -1070,16 +1070,16 @@ function REMOVE_RECEIVER(&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=fal
return $ret;
}
//
-function GET_TOTAL_DATA($search, $tableName, $lookFor, $whereStatement="userid", $onlyRows=false) {
+function GET_TOTAL_DATA($search, $tableName, $lookFor, $whereStatement="userid", $onlyRows=false, $add="") {
$ret = 0;
if ($onlyRows) {
// Count rows
- $result = SQL_QUERY_ESC("SELECT COUNT(%s) FROM "._MYSQL_PREFIX."_%s WHERE %s='%s'",
- array($lookFor, $tableName, $whereStatement, $search), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT COUNT(%s) FROM "._MYSQL_PREFIX."_%s WHERE %s='%s'%s",
+ array($lookFor, $tableName, $whereStatement, $search, $add), __FILE__, __LINE__);
} else {
// Add all rows
- $result = SQL_QUERY_ESC("SELECT SUM(%s) FROM "._MYSQL_PREFIX."_%s WHERE %s='%s'",
- array($lookFor, $tableName, $whereStatement, $search), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT SUM(%s) FROM "._MYSQL_PREFIX."_%s WHERE %s='%s'%s",
+ array($lookFor, $tableName, $whereStatement, $search, $add), __FILE__, __LINE__);
}
// Load row
@@ -1303,7 +1303,7 @@ function UPDATE_REF_COUNTER ($uid) {
} elseif ((($ref == $uid) || ($ref == 0)) && (GET_EXT_VERSION("cache") >= "0.1.2")) {
// Remove cache here
//* DEBUG: */ print __FUNCTION__."(".__LINE__."):ref={$ref} - CACHE!
\n";
- if ($cacheInstance->cache_file("refsystem", true)) $cacheInstance->cache_destroy();
+ REBUILD_CACHE("refsystem", "refsystem");
}
// "Walk" back here
@@ -1853,7 +1853,7 @@ function UPDATE_CONFIG ($entries, $values, $updateMode="") {
$entries = substr($all, 0, -1);
} elseif (!empty($updateMode)) {
// Update mode set
- $entries .= sprintf("=%s%s%s", $entries, $updateMode, (float)$value);
+ $entries .= sprintf("=%s%s%s", $entries, $updateMode, (float)$values);
} else {
// Regular entry to update
$entries .= sprintf("='%s'", SQL_ESCAPE($values));