diff --git a/src/Libs/ModelMySQL.php b/src/Libs/ModelMySQL.php index a392e7e..5699d4d 100644 --- a/src/Libs/ModelMySQL.php +++ b/src/Libs/ModelMySQL.php @@ -631,9 +631,10 @@ class ModelMySQL { * @return int */ public static function count($resetQuery = true) { - static::$querySelect['select'] = ['1']; + static::$querySelect['select'] = ['1']; static::$querySelect['sql_calc_found_rows'] = true; - static::$querySelect['limit'] = '1'; + static::$querySelect['limit'] = '1'; + static::$querySelect['orderBy'] = ''; $sql = static::buildQuery($resetQuery); $result = static::query($sql)->fetch_assoc(); return static::found_row();