|
|
@ -25,6 +25,9 @@ function dbConnect() {
|
|
|
|
if (!$database->query("SELECT * FROM lychee_photos, lychee_albums, lychee_settings;"))
|
|
|
|
if (!$database->query("SELECT * FROM lychee_photos, lychee_albums, lychee_settings;"))
|
|
|
|
if (!createTables($database)) exit('Error: Could not create tables!');
|
|
|
|
if (!createTables($database)) exit('Error: Could not create tables!');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Avoid sql injection
|
|
|
|
|
|
|
|
$database->set_charset('GBK');
|
|
|
|
|
|
|
|
|
|
|
|
return $database;
|
|
|
|
return $database;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|