Welcome Guest, Not a member yet? Register   Sign In
[PENDING] Exporting data to files (which plugins ?)
#1

[eluser]Morty[/eluser]
Hi there!

I am quite successful in building my first CI application, and since I now have good results coming from my database, I would like to export them to Excel-readable files. There seems to be plugins/libraries to export QUERIES (or query results) directly to CSVs (or XLS) but I want to modify some of my results before sending them to CSV files.

- Is it possible to change query results, like adding columns and entries ?
- Which libraries / plugins are available to export data ?

Thanks in advance,
Morty
#2

[eluser]Glen Swinfield[/eluser]
To change a query result you need to change the query. Query result = result of query.

But you can operate on a php array created from a query result, you'll need some array functions though.
#3

[eluser]Morty[/eluser]
I can't change the query to display what I actually want because some of my info need to be aggregated.

Example:
idSite | Where | Qty
ALO | C5 | 10
ALO | C6 | 10

I need to save:

idSite | C5 | C6
ALO | 10 | 10

That's of course simplified.




Theme © iAndrew 2016 - Forum software by © MyBB