Exporting oracle query results to CSV using PHP

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
srirams
Forum Commoner
Posts: 36
Joined: Wed May 25, 2005 8:57 am
Location: India
Contact:

Exporting oracle query results to CSV using PHP

Post by srirams »

Hi,

I am trying to export the results of an oracle query into a CSV file and downloadable from a browser using PHP code.
I have seen many sample codes for mysql.

Can someone paste an example code to perform the above.

Regards
Sriram.S
WebbieDave
Forum Contributor
Posts: 213
Joined: Sun Jul 15, 2007 7:07 am

Re: Exporting oracle query results to CSV using PHP

Post by WebbieDave »

No code from me but I can point you in the right direction.

Here's an RFC for csv
http://tools.ietf.org/html/rfc4180

Here's a quicker explanation of the csv format:
http://en.wikipedia.org/wiki/Comma-separated_values

Here's a link to PHP's oracle docs
http://us.php.net/oracle

Here's one to Oracle's PHP Dev Center:
http://www.oracle.com/technology/tech/php/index.html

You could probably find free code to do the required functionality with minor modifications on google.
Post Reply