Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Export database to sql dump in php

<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'password';
$dbname = 'test';
$mysqldump=exec('which mysqldump');


$command = "$mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname > $dbname.sql";

exec($command);
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Export #database #sql #dump #php
ADD COMMENT
Topic
Name
9+8 =