When you do a sql select command, an option is to have the result exported
to a file.

Example:
SELECT name, addr, phone
INTO OUTFILE '/tmp/result.txt'
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
     LINE TERMINATED BY '\n'
FROM customer

There are other export options that you can use to control the export file
format.
Look at MySQL Manual 6.4.1

What to you need the structure to look like. Are you trying to build
something that looks like the mysqldump results.

I have written a PHP function that does the opposite of what you are trying
to do.  A PHP page that a user can upload a file and then I use the LOAD
DATA mysql command to insert the files data.

Mark.

"Janos Rusiczki" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I'm looking for a premade PHP script / class or a tutorial on how to
> export the structure and data of a few given MySQL tables as seen in
> phpMyAdmin.
>
> Any ideeas would be also appreciated.
>
> I searched the major web sites (like hotscripts.com, phpclasses.org) and
> this list's archive but I still couldn't find any real answer for my
> problem.
>
> -j-
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to