Page 1 of 1

how to extract data from MYSQL database to a text file

Posted: Wed Aug 09, 2006 6:40 am
by madhu
Hi all,

can any body guide "how to extract data from MYSQL database to a text file"??

i know how to connect to mysql using php , performing all mysql operations and fetching data from mysql using php.

Now problem is how to store that data in a text file??

Please help me how to solve this issue.

waiting for your valuable replies

Regards
Madhu

hi

Posted: Wed Aug 09, 2006 6:59 am
by parveen.sehrawat
the ans 4 ur query is:::

u can just rt. click on database , select the option "Export database as sql dump".
Here u select the radio button structure and data. Now ur file is created which u can open in notepad.

Posted: Wed Aug 09, 2006 7:06 am
by jito
you want to save your query result in a text file - is this the problem?

Posted: Wed Aug 09, 2006 7:14 am
by madhu
i know that we can export the data from mysql database using "export" option.

but now problem is am trying to get data from mysql databse and store in a text file using php programatically

Posted: Wed Aug 09, 2006 7:30 am
by jito
just check file handling in php- follow the manual.
there are some functions fopen(),fwrite(), fclose() you need for this purpose.