* code for task#808.
* add bin of check demo data.
This commit is contained in:
14
bin/checkDemoData.php
Executable file
14
bin/checkDemoData.php
Executable 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);
|
||||
|
||||
Reference in New Issue
Block a user