Jump to content

How do you create CSV files with PHP/MySQL


DeepakJ

Recommended Posts

What is a CRV file?

 

If you want to backup your database, use mysqldump

 

http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html

 

Using a web based solution will be very limited in total dump size.  If you want an example/solution, use phpMyAdmin.

I think you mean CSV...comma seperated values

 

http://dev.mysql.com/doc/refman/4.1/en/select.html#id3341530

 

which yeilds....

 

SELECT a,b,a+b INTO OUTFILE '/tmp/result.txt'
  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
  LINES TERMINATED BY '\n'
  FROM test_table;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.