- $result = SQL_QUERY_ESC("SELECT `stats_entry`,`stats_value` FROM `{?_MYSQL_PREFIX?}_stats_%s` ORDER BY `stats_entry` ASC",
- array(date('Ymd', time())), __FUNCTION__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `stats_entry`, `stats_value` FROM `{?_MYSQL_PREFIX?}_stats_%s` ORDER BY `stats_entry` ASC",
+ array(
+ generateDateTime(time(), '6')
+ ), __FUNCTION__, __LINE__);