/** * Load all ids of Category Top to be looped by getOneByOneAsObject */ private static function loadAll() { if (is_null(self::$existing_total)) { $q = "SELECT " . self::COLNAME_ID . " FROM " . self::TABLENAME . " ORDER BY " . self::COLNAME_NAME . " ASC"; $r = tep_db_query($q); while ($row = tep_db_fetch_array($r)) { self::$existing_ids[] = $row[self::COLNAME_ID]; } self::$existing_total = count(self::$existing_ids); } }