Reputation: 384
I am Trying to get backup of mysql database table using php script below but by executing this script it is creating the backup file but with no data in it .Any idea how to overcome this please help me out.
Script
<?php
echo exec('mysqldump -u[root] -p[123456789] -h[localhost] [Android] [houseDetails] --where="addedDate=\'2013-11-22 09:17:28\'"> houseDetails.sql');
?>
Upvotes: 0
Views: 184
Reputation: 1303
Try this:
shell_exec("mysqldump -u root -ppassword db_name table_name --where=\"post_date in ('2011-12-15 06:14:55')\" > /tmp/test.sql");
Upvotes: 1