Problem with obtaining data *SOLVED*

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dakkonz
Forum Commoner
Posts: 69
Joined: Sat Dec 27, 2003 2:55 am
Location: Asia

Problem with obtaining data *SOLVED*

Post by dakkonz »

is there anyway of exporting the data in the MYSQL database out as an excel spreadsheet for the user to download??
Last edited by dakkonz on Wed May 12, 2004 7:59 pm, edited 1 time in total.
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Well you could just get the data from the database and make it into a csv file - just have [data], [data], [data], etc.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

http://us3.php.net/com

look at the first user added comment
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

dakkonz - you can only do this reliably on a Windows server, otherwise you need to look at exporting as CSV.
dakkonz
Forum Commoner
Posts: 69
Joined: Sat Dec 27, 2003 2:55 am
Location: Asia

Post by dakkonz »

i am not using a windows server.....so how do i export as csv data?
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Loads of different ways... write your own function to suck out the data you need, format it in a CSV format and stream it to the browser/save to a file they can download. Or you can make MySQL do a CSV dump directly - but you'll probably have more control in the first instance.
dakkonz
Forum Commoner
Posts: 69
Joined: Sat Dec 27, 2003 2:55 am
Location: Asia

Post by dakkonz »

kz thx..... :D
Post Reply