Menu
Hi all,
I’m trying to get my head around mysqldump, and seem to be missing something…
this…
[code=php]$targetfile = “/tmp/backup.sql”;
$dump = “mysqldump –opt -h localhost -u myuser -p mypassword $db > $targetfile”;
system($dump);
creates an empty file “backup.sql” in the “/tmp” folder (there [B]is
And can I have the mysqldump output sent directly to a php variable instead of a file? I’ve found that mysqldump creates lines that are too long, so I want to replace “),(” with “),rn(” in the output. Perhaps something like
$output = system($dump);
might work?
Thanks
CTB