Recommend this page to a friend! | ![]() |
![]() |
All requests ![]() |
> | write in to csv | > | Request new recommendation | > | ![]() |
> | ![]() |
||
by ramesh - 11 months ago (2015-03-01) csv
0 | get data from db and put in csv |
1. by Manuel Lemos - 11 months ago (2015-03-04) Reply
What database are you using? Is it MySQL or some other database?
0 |
My MySQL database class has a write() method that outputs a matrix to csv. (All the SELECT statements in my class return a matrix.) So you could use it like so: include "DB.php"; $db = new DB("my_table"); $db->write("output_file_name.csv", $db->all()); Including a third parameter will let you save in tab or any other form of delimited format. |
Recommend package | |
|