X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fsurfbar_functions.php;h=10a2ba6583693fc99c4f03c54ff0a6aac06abdeb;hp=08b2bd164518dbaae9c65e8f268e7ba0383e97cf;hb=fe1e1d3b8291b1ca991e3d2e639cb28097c53d74;hpb=160c118f767dd39fdef7007c170a5bac4d876b8e diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 08b2bd1645..10a2ba6583 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -879,6 +879,12 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = 0) { // Determine depleted user account $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS(); + // If we dont get any user ids back, there are no URLs + if (count($UIDs['uid']) == 0) { + // No user ids found, no URLs! + return 0; + } // END - if + // Is the exlude userid set? if ($excludeUserId > 0) { // Then add it @@ -886,10 +892,10 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = 0) { } // END - if // Get amount from database - $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt + $result = SQL_QUERY_ESC("SELECT COUNT(`id`) AS cnt FROM `{!_MYSQL_PREFIX!}_surfbar_urls` -WHERE userid NOT IN (".implode(',', $UIDs['uid']).") AND `status`='%s'", - array($status), __FUNCTION__, __LINE__ +WHERE `userid` NOT IN (".implode(', ', $UIDs['uid']).") AND `status`='%s'", + array($status), __FUNCTION__, __LINE__ ); // Fetch row