fixed error in check for exiting tables
Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
parent
b3e0067ce1
commit
2c6179914a
@ -30,7 +30,9 @@ class DatabaseConnection
|
||||
);
|
||||
$sql = "SHOW TABLES";
|
||||
$statement = $this->dbConnection->prepare($sql);
|
||||
if (!$statement->execute()) {
|
||||
$statement->execute();
|
||||
$result = $statement->fetch();
|
||||
if (empty($result)) {
|
||||
|
||||
echo 'Error: Cannot find tables.' . PHP_EOL;
|
||||
if (confirm('Should I try to create them?')) {
|
||||
|
Loading…
Reference in New Issue
Block a user