开发者

queryable sql-like data structure in PHP?

I have a PHP web app that generates a somewhat complex report from our database. The resulting data structure to populate the report is a big ol' array, and it's heavily nested, and it's kind of a pain to dig into to find just one thing.

Ideally I'd like to have some kind of data structure that I can just query, like a database. So开发者_如何学Gomething like "get overall_score from X where Y = Z".

One thought that occurs to me is that I could just use temp tables and query those instead of using the array. But temp tables die after the session; I'd like something that I could keep alive a little longer.


If you want a temporary database you can create/drop in, delete fully at any time, and is just for convenience in retrieval, I'd load it in an SQLite db. Keep the DB file around as long or as short as you like, share it with other processes, etc.


You want views.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜