Merge pull request #57 from leplatrem/patch-1
Prevent fetching many rows to check table existance (fixes #54 and #50)
This commit is contained in:
commit
f0f50fae3c
@ -22,7 +22,7 @@ function dbConnect() {
|
||||
|
||||
if (!$database->select_db($dbName))
|
||||
if (!createDatabase($dbName, $database)) exit('Error: Could not create database!');
|
||||
if (!$database->query("SELECT * FROM lychee_photos, lychee_albums, lychee_settings;"))
|
||||
if (!$database->query("SELECT * FROM lychee_photos, lychee_albums, lychee_settings LIMIT 1;"))
|
||||
if (!createTables($database)) exit('Error: Could not create tables!');
|
||||
|
||||
// Avoid sql injection on older MySQL versions
|
||||
@ -183,4 +183,4 @@ function createTables($database) {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user