0

Possible Duplicate:
Best practice: Import mySQL file in PHP; split queries

How to import import *.sql file into database and export db to *.sql file in php coding?

Community
  • 1
  • 1
Kumar V
  • 8,810
  • 9
  • 39
  • 58

1 Answers1

1
exec("mysqldump database -u username -p password  > output.sql");

http://ca3.php.net/manual/en/function.exec.php

http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

Prusprus
  • 7,987
  • 9
  • 42
  • 57
hoppa
  • 3,011
  • 18
  • 21