Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2003
    Location
    Ontario, Canada
    Posts
    5

    Unhappy Unanswered: exporting "MySQL table" into "Text file"

    Hi Friends,

    I am using MySQL 3.23.56
    I am trying to export a MySQL tables to a flat "Text files" (with each records on different rows with seperators). MySQL should be able to create the "Text file" for me.

    Please dont consider me as an expert and explain me accordingly.

    Here is the table information
    table name "user"

    fields structure

    name, varchar(70)
    email, varchar(255)
    date, int(11)
    signature, text

    It will be great if someone can tell me how to code the whole thing in PHP 4. I repeat I am using MySQL 3.23.56.
    Last edited by laserlaserman; 07-02-03 at 15:25.

  2. #2
    Join Date
    Jan 2003
    Location
    Paris, France
    Posts
    320
    You can use mysql dump program

    http://www.mysql.com/doc/en/mysqldump.html
    Olivier Miossec
    --
    http://www.lasso-developpeur.net/
    --

  3. #3
    Join Date
    Jul 2003
    Location
    Ontario, Canada
    Posts
    5
    Thanks.
    But it does not gives me the option for copying in a TEXT file. Can you explain it to me plz.

    Arup

  4. #4
    Join Date
    Jan 2003
    Location
    Paris, France
    Posts
    320
    Originally posted by laserlaserman
    Thanks.
    But it does not gives me the option for copying in a TEXT file. Can you explain it to me plz.

    Arup
    No it can create a text file simply add > pathto/text_file to your statement

    You can also use select ... outfile statement
    Olivier Miossec
    --
    http://www.lasso-developpeur.net/
    --

  5. #5
    Join Date
    Jul 2003
    Location
    Southampton, UK
    Posts
    4
    You can simply do a ...

    select from <table name> where <condition> into outfile '</path/filename'>;

    bigV

  6. #6
    Join Date
    Jun 2003
    Location
    México
    Posts
    5

    Re: exporting "MySQL table" into "Text file"

    If you have some control over the server in which MySQL server is installed, you can install phpMyAdmin, it is a great tool because can help you to perform many of the common tasks with your databases.

    phpMyAdmin has the option dump a table into a file text (CVS).

    Good look.

Posting Permissions

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