title: php mysqldump and zip 7z
body: <p>I have this line of php backing up my databases, work's like a charm (Windows 7):</p>
  
  <pre><code>$exec_str = "{$real_path}Bin\mysqldump -h {$mysql_db_host} -u {$mysql_db_user} -p{$mysql_db_pasw} {$db_name} &gt; {$backupdir}\\{$db_name}.sql";
  </code></pre>
  
  <p>But i would rather prefer to have the .sql files compressed with 7zip (as 7z)</p>
  
  <p>This one will not work (path to 7za.exe is correct)
  Instead it generates empty 7z files:</p>
  
  <pre><code>$exec_str = "{$real_path}Bin\mysqldump -h {$mysql_db_host} -u {$mysql_db_user} -p{$mysql_db_pasw} {$db_name} | {$real_path}7za a &gt; {$backupdir}\\{$db_name}.sql.7z";
  </code></pre>
  
  <p>What am i doing wrong?</p>