Skip to content

Commit

Permalink
更改执行方法
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouyangyang committed Aug 4, 2020
1 parent a2d3989 commit 81e4335
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ private function executeAddTables($add_table_sql_collect)
{
$this->localConnector->query('SET FOREIGN_KEY_CHECKS=0');
foreach ($add_table_sql_collect as $key => $sql) {
if ($this->localConnector->query($sql)) {
if ($this->localConnector->exec($sql)) {
$this->statistics['success']['ADD_TABLE'][] = $sql;
unset($add_table_sql_collect[$key]);
} else {
$this->statistics['error']['ADD_TABLE'][] = $sql;
}
}
$this->localConnector->query('SET FOREIGN_KEY_CHECKS=1');
$this->localConnector->exec('SET FOREIGN_KEY_CHECKS=1');
}
}

0 comments on commit 81e4335

Please sign in to comment.