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,780
  • 9
  • 38
  • 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,888
  • 8
  • 41
  • 56
hoppa
  • 3,001
  • 17
  • 21