<?php
set_time_limit(0);
$con = mysql_connect("host", "user", "pwd");
$dbname = "db";
if ($con) {
  if (mysql_select_db($dbname, $con)) {
    $sql = "SHOW TABLES WHERE Tables_in_$dbname not  LIKE '%0%';";
    $ret = mysql_query($sql);
    while($row = mysql_fetch_assoc($ret)){
      $info1[] = $row["Tables_in_$dbname"];
    }
    foreach ($info1 as $val) {
      $cmd = "mysqldump --default-character-set=latin1 -u user -h host  -ppwd $dbname $val --where='1 limit 100'   >> $val.sql";
      shell_exec($cmd);
    }
  }
}
mysql_close($con);
?>

  

相关文章:

  • 2022-12-23
  • 2021-04-12
  • 2021-10-23
  • 2021-12-07
  • 2021-10-26
  • 2021-08-07
  • 2021-12-26
猜你喜欢
  • 2021-05-30
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2021-04-16
  • 2021-09-22
相关资源
相似解决方案