}
// update per company files
- $cnt = count($db_connections);
+ $cnt = max(1, count($db_connections));
for($i = 0; $i < $cnt; $i++)
{
$newexts = $extensions;
function db_import($filename, $connection, $force=true)
{
- global $db, $go_debug;
+ global $db, $go_debug, $sql_trail;
+
+ $sql_trail = false;
$allowed_commands = array(
"create" => 'table_queries',
{ // check if line begins with one of allowed queries
foreach($allowed_commands as $cmd => $table)
{
-// if (strtolower(substr($line, 0, strlen($cmd))) == $cmd)
- if (stripos($line, $cmd) === 0)
+ if (strtolower(substr($line, 0, strlen($cmd))) == $cmd)
{
if ($cmd == 'delimiter') {
$delimiter = trim(substr($line, 10));