Backquote table name (bug #1050441).
This commit is contained in:
@@ -7,6 +7,7 @@ $Source$
|
||||
|
||||
2004-10-20 Michal Čihař <michal@cihar.com>
|
||||
* lang/czech: Update.
|
||||
* tbl_relation.php: Backquote table name (bug #1050441).
|
||||
|
||||
2004-10-19 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/database_interface.lib.php: bug #1041667, correctly
|
||||
|
@@ -128,7 +128,7 @@ if (isset($submit_rel) && $submit_rel == 'true') {
|
||||
// backquotes but MySQL 4.0.16 did not like the syntax
|
||||
// (for example: `base2`.`table1` )
|
||||
|
||||
$upd_query = 'ALTER TABLE ' . $table
|
||||
$upd_query = 'ALTER TABLE ' . PMA_backquote($table)
|
||||
. ' ADD FOREIGN KEY ('
|
||||
. PMA_backquote(PMA_sqlAddslashes($master_field)) . ')'
|
||||
. ' REFERENCES '
|
||||
@@ -155,7 +155,7 @@ if (isset($submit_rel) && $submit_rel == 'true') {
|
||||
|
||||
// remove existing key
|
||||
if (PMA_MYSQL_INT_VERSION >= 40013) {
|
||||
$upd_query = 'ALTER TABLE ' . $table
|
||||
$upd_query = 'ALTER TABLE ' . PMA_backquote($table)
|
||||
. ' DROP FOREIGN KEY '
|
||||
. PMA_backquote($existrel_innodb[$master_field]['constraint']);
|
||||
|
||||
@@ -164,7 +164,7 @@ if (isset($submit_rel) && $submit_rel == 'true') {
|
||||
}
|
||||
|
||||
// add another
|
||||
$upd_query = 'ALTER TABLE ' . $table
|
||||
$upd_query = 'ALTER TABLE ' . PMA_backquote($table)
|
||||
. ' ADD FOREIGN KEY ('
|
||||
. PMA_backquote(PMA_sqlAddslashes($master_field)) . ')'
|
||||
. ' REFERENCES '
|
||||
@@ -182,7 +182,7 @@ if (isset($submit_rel) && $submit_rel == 'true') {
|
||||
} // end if... else....
|
||||
} else if (isset($existrel_innodb[$master_field])) {
|
||||
if (PMA_MYSQL_INT_VERSION >= 40013) {
|
||||
$upd_query = 'ALTER TABLE ' . $table
|
||||
$upd_query = 'ALTER TABLE ' . PMA_backquote($table)
|
||||
. ' DROP FOREIGN KEY '
|
||||
. PMA_backquote($existrel_innodb[$master_field]['constraint']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user