change querying of triggers in conformity with the example in MySQL manual

This commit is contained in:
Marc Delisle
2008-04-26 15:18:12 +00:00
parent 728e553098
commit 4d4ec9ccc9

View File

@@ -1241,7 +1241,10 @@ function PMA_DBI_get_triggers($db, $table)
{
$result = array();
$triggers = PMA_DBI_fetch_result("SELECT TRIGGER_SCHEMA, TRIGGER_NAME, EVENT_MANIPULATION, ACTION_TIMING, ACTION_STATEMENT, EVENT_OBJECT_SCHEMA, EVENT_OBJECT_TABLE FROM information_schema.TRIGGERS WHERE EVENT_OBJECT_SCHEMA= '" . PMA_sqlAddslashes($db,true) . "' and EVENT_OBJECT_TABLE = '" . PMA_sqlAddslashes($table, true) . "';");
// Note: in http://dev.mysql.com/doc/refman/5.0/en/faqs-triggers.html
// their example uses WHERE TRIGGER_SCHEMA='dbname' so let's use this
// instead of WHERE EVENT_OBJECT_SCHEMA='dbname'
$triggers = PMA_DBI_fetch_result("SELECT TRIGGER_SCHEMA, TRIGGER_NAME, EVENT_MANIPULATION, ACTION_TIMING, ACTION_STATEMENT, EVENT_OBJECT_SCHEMA, EVENT_OBJECT_TABLE FROM information_schema.TRIGGERS WHERE TRIGGER_SCHEMA= '" . PMA_sqlAddslashes($db,true) . "' and EVENT_OBJECT_TABLE = '" . PMA_sqlAddslashes($table, true) . "';");
if ($triggers) {
$delimiter = '//';