SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Location
    Wigan, UK
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation outputting to txt files in my sql

    how do i output data to a text file in mysql

    i want to output table descriptions and content into 2 seperate files, 1 for table description and 1 for the contents of the table.
    This post is brought to you in association with Carling - The UK's Premier Lager

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    To export your data your can use the "INTO OUTFILE" clause. Basically it would look like:

    Code:
    SELECT * FROM table WHERE x=y INTO OUTFILE 'tabledata'
    To export your data structures you would have to capture the DESCRIBE command's output. I am sure there is another way, just haven't found it in the old documentation I have. Downloading the new documentation now.
    Last edited by Hierophant; Mar 12, 2002 at 10:54.
    Wayne Luke
    ------------



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •