public static ArrayList<String[]> ToateSpectacolele()
    {
        //Citeste spectacolele din tabelul Spectacole al bazei de date
        
        ArrayList<String[]> data = new ArrayList<>();
        SQLiteStatement queryResult = null;
        
        try
        {
            queryResult = database.prepare("SELECT * FROM Spectacole");
            while(queryResult.step())
            {
                String[] row = new String[9];
                for(int column = 0; column < 9; column++)
                {
                    row[column] = queryResult.columnString(column);
                }
                data.add(row);
            }
        }
        catch (SQLiteException ex)
        {
            JOptionPane.showMessageDialog(null, ex,"Eroare",JOptionPane.ERROR_MESSAGE);
        }
        if(data.isEmpty())
        {
            JOptionPane.showMessageDialog(null, "Nu exista spectacole", "Eroare",JOptionPane.ERROR_MESSAGE);
            return null;
        }
        return data;
    }