From 99454bd5620b1d85618e63a14e4cbcf151c6c519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Tue, 19 Mar 2013 21:11:10 +0100 Subject: [PATCH] Add another test in checkconfig to check if the database contains at least some table from Calibre. --- checkconfig.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/checkconfig.php b/checkconfig.php index a71ee32..3d48ff6 100644 --- a/checkconfig.php +++ b/checkconfig.php @@ -107,6 +107,24 @@ Please check ?> +
+
Check if Calibre database file contains at least some of the needed tables
+
+ query("select count(*) FROM sqlite_master WHERE type='table' AND name in ('books', 'authors', 'tags', 'series')")->fetchColumn(); + if ($count == 4) { + echo "OK"; + } else { + echo "Not all Calibre tables were found. Are you you're using the correct database."; + } + } catch (Exception $e) { + echo "If the file is readable, check your php configuration. Exception detail : " . $e; + } + ?> +
+