mysql --user=root --password=root --extended-insert=false --where="ID in (1,2) AND post_author='1'" wp_7 wp_posts > 1.sql;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'mysql
--user=root --password=root --extended-insert=false --where="ID in (1,2) A' at
line 1
另外,我需要在php字符串中输出mysqldump。不在文件中。
答案 0 :(得分:0)
$dump = shell_exec('mysqldump --user=user --password=asdasd --host=localhost db_name');