Page 1 of 1
CSV export
Posted: Fri Apr 13, 2007 11:35 am
by guitarlvr
I have created a script using the fgetcvs() function (very cool might i add). It echos the data to the screen as well as inserts the data into a mysql database. I am wondering if you can do the opposite with the same function to extract the data from the database and into a CSV file or if i have to do that manually. Any thoughts?
Thanks,
Wayne
Posted: Fri Apr 13, 2007 12:14 pm
by RobertGonzalez
You should be able to use the file system functions to do that.
file(),
fputs(), etc...
Posted: Fri Apr 13, 2007 12:18 pm
by guitarlvr
Thats what i was thinking. I didnt know if i could use fgetcsv in reverse or not. I can use file() and fputs() though.
Thanks!
Posted: Fri Apr 13, 2007 4:31 pm
by feyd
Posted: Fri Apr 13, 2007 4:32 pm
by RobertGonzalez
I swear I looked for that function and didn't find it. Man, I need to look around better.
Posted: Fri Apr 13, 2007 4:49 pm
by guitarlvr
Thats exactly what i was looking for. Thanks a lot guys!
Wayne