Fictive Table - Model Based On File, Not Table

Hi guys…

I have a txt file which can be parsed and saved into DB. But I don’t want to save it to DB, I just need to create a fictive table in memory (using Active Recod for example) and I need to sort it, group it and select values. Very often the file is changed and the old version is useless. Each row of the file has length of 128 signs and I know that 9 chars = name, 9 chars = surname, 6 chars = born date etc (no delimiters)

example of file:

Peter    Moris    050686 M     USA  California   San Francisco    21 Cool Drive

Clair    Kelly    121089 F    UK   UK           London           13 Funny Road 



Can this be done? Or should I load it to DB?

You can parse in a php array and then use CArrayDataProvider.

Anyway, I think that writing a command for load the file in the database will save you a lot of time.