Dovresti fare un cilo e riempire l'array...

Ma la colonna list della tabella di che tipo è?