|All requests||>||write in to csv||>||Request new recommendation||>||Featured requests||>||No recommendations|
by ramesh - 8 years ago (2015-03-01)
get data from db and put in csv
1. by Manuel Lemos - 8 years ago (2015-03-04) Reply
What database are you using? Is it MySQL or some other database?
by Justin Eldracher 140 - 7 years ago (2015-06-22) Comment
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.