• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.