PHP Classes

write in to csv: get data from db and put in csv

Recommend this page to a friend!
  All requests RSS feed  >  write in to csv  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

write in to csv

Edit

Picture of ramesh by ramesh - 9 years ago (2015-03-01)

get data from db and put in csv

This request is clear and relevant.
This request is not clear or is not relevant.

0

get data from db and put in csv

  • 1 Clarification request
  • 1. Picture of Manuel Lemos by Manuel Lemos - 9 years ago (2015-03-04) Reply

    What database are you using? Is it MySQL or some other database?

    Ask clarification

    1 Recommendation

    MySQL Database Library: Access MySQL databases and manipulate files

    This recommendation solves the problem.
    This recommendation does not solve the problem.

    0

    Picture of Justin Eldracher by Justin Eldracher package author package author Reputation 140 - 8 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.


    Recommend package
    : 
    :