* code for task#808.

* add bin of check demo data.
This commit is contained in:
chencongzhi520@gmail.com
2012-06-07 07:48:01 +00:00
parent 73de3bff2e
commit 03ebdd0572

14
bin/checkDemoData.php Executable file
View File

@@ -0,0 +1,14 @@
<?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);