Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting mysql db from PHP

Status
Not open for further replies.
Joined
May 22, 2002
Messages
63
Location
GB
Hi,

Does anyone know how to export the contents of a mysql db via PHP? Ideally, I'd like to have a button on a website that will export the contents of the mysql DB to a text file (as you can using phpmyadmin) and save it away as a backup?

Many thanks,

Anders
 
Sure. Issue some queries like [tt]SHOW TABLES[/tt], [tt]DESCRIBE <table name aquired from previous query>[/tt], [tt]SELECT * FROM <table name>[/tt] and you just have to parse the data and turn it into SQL queries. //Daniel
 
Sorry to be a bit stupid but how can I invoke mysqldump as an external app?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top