Ricky
Ricky

Reputation: 384

Issue while taking backup of mysql database table using php script

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. enter image description here

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

Answers (1)

Vickrant
Vickrant

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

Related Questions