Files
EasySoft-ZenTaoPMS/bin/checkDemoData.php
chencongzhi520@gmail.com 03ebdd0572 * code for task#808.
* add bin of check demo data.
2012-06-07 07:48:01 +00:00

15 lines
429 B
PHP
Executable File

<?php
include("../config/my.php");
$demoSql = file("../db/demo.sql");
$output = '';
foreach($demoSql as $sql)
{
if(strpos($sql, 'INSERT') !== false and
strpos($sql, $config->db->prefix . 'config') === false and
strpos($sql, $config->db->prefix . 'company') === false and
strpos($sql, $config->db->prefix . 'group') === false
) $output .= $sql;
}
file_put_contents("../db/demo.sql", $output);