1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 07:06:45 +02:00

Driver specific trigger export

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1519 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2010-05-05 16:28:37 +00:00
parent da8a1b66b9
commit cc04be2eb2
5 changed files with 30 additions and 19 deletions

View File

@@ -498,7 +498,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
function create_sql($table) {
global $connection;
return $connection->result("SELECT sql FROM sqlite_master WHERE name = " . $connection->quote($table));
return $connection->result("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = " . $connection->quote($table));
}
function use_sql($database) {
@@ -506,6 +506,11 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
return "ATTACH " . $connection->quote($database) . " AS " . idf_escape($database);
}
function trigger_sql($table, $style) {
global $connection;
return implode("", get_vals("SELECT sql || ';;\n' FROM sqlite_master WHERE type = 'trigger' AND name = " . $connection->quote($table)));
}
function show_variables() {
global $connection;
$return = array();