- $result1 = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1",
- array(bigintval($ID)), __FILE__, __LINE__);
- $result2 = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1",
- array(bigintval($ID)), __FILE__, __LINE__);
-
- if (SQL_NUMROWS($result1) == 1) {
+ if (countSumTotalData(bigintval($ID), 'pool', 'id', 'id', true) == 1) {