From ad83c7634c2cde2991b1029a172244a91e1861e4 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 1 Feb 2010 16:13:02 +0000 Subject: [PATCH] 'PRAGMA foreign_keys' is SQLite-specific --- core/database.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/database.class.php b/core/database.class.php index 87c36d3d..e2ad9cc2 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -52,9 +52,7 @@ class ImgQuerylet { class DBEngine { var $name = null; - public function init($db) { - $db->execute("PRAGMA foreign_keys = ON;"); - } + public function init($db) {} public function scoreql_to_sql($scoreql) { return $scoreql; @@ -126,6 +124,7 @@ class SQLite extends DBEngine { public function init($db) { ini_set('sqlite.assoc_case', 0); + $db->execute("PRAGMA foreign_keys = ON;"); @sqlite_create_function($db->_connectionID, 'UNIX_TIMESTAMP', '_unix_timestamp', 1); @sqlite_create_function($db->_connectionID, 'now', '_now', 0); @sqlite_create_function($db->_connectionID, 'floor', '_floor', 1);