Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 11th, 2003, 12:59 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default exporting to csv format

I had previously, as my website is still in the design phase, using a SELECT INTO OUTFILE query to export selected details to a csv file. I have now noticed that this isnt going to be usefull because I cant export the records to anywhere other than the mysql folder on the host machine. So now I was thinking of using a mysqldump instead, however I dont know how to phrase it, I have tried looking but the answers I have found have been confusing at best.

I was wondering if anyone could give me an example? I just want the details enclosed by " and seperated by ,
  #2 (permalink)  
Old July 11th, 2003, 03:31 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try looking through the phpMyAdmin source code. They've got all the source it takes to dump a table or database to CSV file, including the appropriate header() calls with mime-types to trigger the browser to save the csv dump as a file download. When I did the same thing, I used their code as a starting point, but modified it to suit my own needs for the site I was building at the time.
   http://www.phpmyadmin.net/


Take care,

Nik
http://www.bigaction.org/


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting Gridview to CSV kadjw ASP.NET 2.0 Basics 2 May 17th, 2008 06:30 AM
Exporting a Datagrid to a CSV file pauljohns353 Visual Basic 2005 Basics 1 November 21st, 2006 04:56 PM
Exporting to CSV smajumdar_82 Access VBA 1 July 10th, 2006 10:38 AM
Need help in exporting memo fields to CSV file Programming_starter C# 0 May 22nd, 2006 11:25 AM
Exporting Report to CSV format. chakravarthy_vr Reporting Services 4 March 20th, 2006 07:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.