exec or shell_exec for dumping MySql info?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm trying to figure out how to export info from a Mysql database,
using PHP to manage the export, as phpMyAdmin manages to do. I'm
guessing I need to run a shell script that looks like this:

mysqldump -u username -ppassword database_name > FILE.sql

and I need to call this shell script using one of the functions on this


but which?  

Do I use exec?

Re: exec or shell_exec for dumping MySql info?

Quoted text here. Click to load it

 Yes, that'd be a reasonable choice for running an external command like

Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

Site Timeline