public static function getRows($tbl, $where = ''): array
    {
        $res = [];
        $sql = self::getInstance()->sql_query('SELECT * FROM `' . self::sql_prepare($tbl) . '`' . ($where ? ' WHERE ' . $where : ''));

        while ($q = $sql->fetch(PDO::FETCH_ASSOC)) {
            $res[] = $q;
        }

        return $res;
    }
public static function getRows($tbl, $where = ''): array
    {
        $res = [];
        $sql = self::getInstance()->sql_query('SELECT * FROM `' . self::sql_prepare($tbl) . '`' . ($where ? ' WHERE ' . $where : ''));

        while ($q = $sql->fetch(PDO::FETCH_ASSOC)) {
            $res[] = $q;
        }

        return $res;
    }
public static function getRows ( $ tbl , $ where = '' ) : array { $ res = [ ] ; $ sql = self :: getInstance ( ) -> sql_query ( 'SELECT * FROM `' . self :: sql_prepare ( $ tbl ) . '`' . ( $ where ? ' WHERE ' . $ where : '' ) ) ; while ( $ q = $ sql -> fetch ( PDO :: FETCH_ASSOC ) ) { $ res [ ] = $ q ; } return $ res ; }
Get all rows with data from table

@param string $tbl - table name
@param string $where - for where clause
@return array fetched data
Get all rows with data from table