mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-11 17:53:50 -04:00
Rename columns that use reserved SQL words : items.left and items.right
This commit is contained in:
@@ -103,15 +103,15 @@ class Database_Test extends Unit_Test_Case {
|
||||
$sql = "UPDATE {test_tables} SET `name` = '{test string}' " .
|
||||
"WHERE `item_id` IN " .
|
||||
" (SELECT `id` FROM {items} " .
|
||||
" WHERE `left` >= 1 " .
|
||||
" AND `right` <= 6)";
|
||||
" WHERE `left_ptr` >= 1 " .
|
||||
" AND `right_ptr` <= 6)";
|
||||
$sql = $db->add_table_prefixes($sql);
|
||||
|
||||
$expected = "UPDATE g3test_test_tables SET `name` = '{test string}' " .
|
||||
"WHERE `item_id` IN " .
|
||||
" (SELECT `id` FROM g3test_items " .
|
||||
" WHERE `left` >= 1 " .
|
||||
" AND `right` <= 6)";
|
||||
" WHERE `left_ptr` >= 1 " .
|
||||
" AND `right_ptr` <= 6)";
|
||||
|
||||
$this->assert_same($expected, $sql);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user