{"comment":{"created_at":"2011-10-26T11:56:13Z","body":"Does 1112abc8f55bfe27551c3453f933b66ab465a96f fix this the issue?","updated_at":"2011-10-26T11:56:13Z","url":"https://api.github.com/repos/symphonycms/selectbox_link_field/issues/comments/2529410","id":2529410,"user":{"avatar_url":"https://secure.gravatar.com/avatar/6be8e584a0f454ac2dc7600bdeaca7b7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"6be8e584a0f454ac2dc7600bdeaca7b7","url":"https://api.github.com/users/brendo","id":69268,"login":"brendo"}},"action":"created","issue":{"number":12,"created_at":"2011-10-23T19:46:52Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Every time I try to use this field to link/retrieve entries that have `'` (apostrophe) it breaks...\r\n\r\nIt always seems to be the caching SQL that breaks, so I don't know if it is this field itself, or the core MySQL class...\r\n\r\n\r\n```\r\nYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 4\r\nAn error occurred while attempting to execute the following query\r\nSELECT SQL_CACHE e.id, e.section_id, s.name, s.handle FROM `sym_entries` AS `e` LEFT JOIN `sym_sections` AS `s` ON (s.id = e.section_id) WHERE e.id IN ()\r\nBacktrace:\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/symphony/lib/toolkit/class.mysql.php:463] MySQL->__error();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/symphony/lib/toolkit/class.mysql.php:609] MySQL->query();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/extensions/selectbox_link_field/fields/field.selectbox_link.php:233] MySQL->fetch();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/extensions/selectbox_link_field/fields/field.selectbox_link.php:474] fieldSelectBox_Link->findRelatedValues();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/extensions/reflectionfield/extension.driver.php:102] fieldSelectBox_Link->appendFormattedElement();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/extensions/reflectionfield/fields/field.reflection.php:263] Extension_ReflectionField->getXPath();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/extensions/reflectionfield/extension.driver.php:131] FieldReflection->compile();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/symphony/lib/toolkit/class.extensionmanager.php:559] Extension_ReflectionField->compileBackendFields();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/symphony/content/content.publish.php:897] ExtensionManager->notifyMembers();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/symphony/content/content.publish.php:40] contentPublish->__actionEdit();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/symphony/content/content.publish.php:26] contentPublish->__switchboard();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/symphony/lib/toolkit/class.administrationpage.php:242] contentPublish->action();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/symphony/lib/core/class.administration.php:230] AdministrationPage->build();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/symphony/lib/core/class.administration.php:383] Administration->__buildPage();\r\n[/Users/designermonkey/Projects/Symphony/finances/httpdocs/index.php:25] Administration->display();\r\nDatabase Query Log:\r\nSET character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'; [0.0001]\r\nSET CHARACTER SET 'utf8'; [0.0001]\r\nSELECT SQL_CACHE `session_data` FROM `sym_sessions` WHERE `session` = '3ed167ef15d8d13391f100d6e9009782' LIMIT 1; [0.0002]\r\nDELETE FROM `sym_sessions` WHERE `session_expires` <= '1318189319'; [0.0001]\r\nSELECT SQL_CACHE `name` FROM `sym_extensions` WHERE `status` = 'enabled'; [0.0001]\r\nSELECT SQL_CACHE `id` FROM `sym_authors` WHERE `username` = 'john-porter' AND `password` = 'b064039c12eec87b0034061bc876418a82bca30c' LIMIT 1; [0.0002]\r\nUPDATE sym_authors SET `last_seen` = '2011-10-23 20:41:59' WHERE `id` = '1'; [0.0002]\r\nSELECT SQL_CACHE * FROM `sym_authors` WHERE `id` IN (1) ORDER BY id ASC; [0.0001]\r\nSELECT SQL_CACHE * FROM `sym_extensions`; [0.0003]\r\nSELECT SQL_CACHE * FROM `sym_authors` WHERE `username` = 'john-porter' LIMIT 1; [0.0002]\r\nSELECT SQL_CACHE * FROM `sym_sections` ORDER BY `sortorder` ASC; [0.0004]\r\nSELECT SQL_CACHE * FROM `sym_authors` WHERE `username` = 'john-porter' LIMIT 1; [0.0002]\r\nSELECT SQL_CACHE t1.name, t2.page, t2.delegate, t2.callback FROM `sym_extensions` as t1 INNER JOIN `sym_extensions_delegates` as t2 ON t1.id = t2.extension_id WHERE t1.status = 'enabled'; [0.0003]\r\nSELECT SQL_CACHE `section_id` FROM `sym_entries` WHERE `id` = '481' LIMIT 1; [0.0002]\r\nSELECT SQL_CACHE `s`.* FROM `sym_sections` AS `s` WHERE `s`.`id` = '1'; [0.0002]\r\nSELECT SQL_CACHE `e`.id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date` FROM `sym_entries` AS `e` WHERE 1 AND `e`.`id` IN ('481') AND `e`.`section_id` = '1'; [0.0002]\r\nSELECT SQL_CACHE `id` FROM `sym_fields` WHERE `parent_section` = 1; [0.0002]\r\nSELECT SQL_CACHE * FROM `sym_entries_data_1` WHERE `entry_id` IN (481) ORDER BY `id` ASC; [0.0001]\r\nSELECT SQL_CACHE * FROM `sym_entries_data_2` WHERE `entry_id` IN (481) ORDER BY `id` ASC; [0.0002]\r\nSELECT SQL_CACHE * FROM `sym_entries_data_3` WHERE `entry_id` IN (481) ORDER BY `id` ASC; [0.0001]\r\nSELECT SQL_CACHE `id`, `element_name`, `type`, `location` FROM `sym_fields` WHERE `parent_section` = '1' ORDER BY `sortorder` ASC; [0.0001]\r\nSELECT SQL_CACHE t1.* FROM sym_fields as t1 WHERE 1 AND t1.`id` = '1' LIMIT 1; [0.0002]\r\nSELECT SQL_CACHE * FROM `sym_fields_input` WHERE `field_id` = '1' LIMIT 1; [0.0002]\r\nSELECT SQL_CACHE t1.* FROM sym_fields as t1 WHERE 1 AND t1.`id` = '2' LIMIT 1; [0.0002]\r\nSELECT SQL_CACHE * FROM `sym_fields_selectbox_link` WHERE `field_id` = '2' LIMIT 1; [0.0002]\r\nSELECT SQL_CACHE t1.* FROM sym_fields as t1 WHERE 1 AND t1.`id` = '3' LIMIT 1; [0.0002]\r\nSELECT SQL_CACHE * FROM `sym_fields_reflection` WHERE `field_id` = '3' LIMIT 1; [0.0002]\r\nSELECT SQL_CACHE `id`, `element_name`, `type`, `location` FROM `sym_fields` WHERE `parent_section` = '1' ORDER BY `sortorder` ASC; [0.0002]\r\nSELECT SQL_CACHE t1.* FROM sym_fields as t1 WHERE 1 AND t1.`parent_section` = '1' ORDER BY t1.`sortorder` ASC; [0.0002]\r\nDELETE FROM sym_entries_data_1 WHERE `entry_id` = '481'; [0.0002]\r\nINSERT INTO `sym_entries_data_1` (`entry_id`, `value`, `handle`) VALUES ('481', 'Mama Tai\\'s', 'mama-tais'); [0.0002]\r\nDELETE FROM sym_entries_data_2 WHERE `entry_id` = '481'; [0.0002]\r\nINSERT INTO `sym_entries_data_2` (`entry_id`, `relation_id`) VALUES ('481', NULL); [0.0001]\r\nDELETE FROM sym_entries_data_3 WHERE `entry_id` = '481'; [0.0002]\r\nINSERT INTO `sym_entries_data_3` (`entry_id`, `handle`, `value`, `value_formatted`) VALUES ('481', NULL, NULL, NULL); [0.0002]\r\nSELECT SQL_CACHE * FROM `sym_sections_association` AS `sa`, `sym_sections` AS `s` WHERE `sa`.`parent_section_id` = 1 AND `s`.`id` = `sa`.`child_section_id` ORDER BY `s`.`sortorder` ASC; [0.0002]\r\nSELECT SQL_CACHE COUNT(*) as `count` FROM `sym_entries_data_2` WHERE `relation_id` = 481; [0.0002]\r\nSELECT SQL_CACHE s.handle FROM `sym_sections` AS s WHERE s.id = '1' LIMIT 1; [0.0001]\r\nSELECT SQL_CACHE t1.* FROM sym_fields as t1 WHERE 1 AND id IN (3) ORDER BY t1.`sortorder` ASC; [0.0002]\r\nSELECT SQL_CACHE e.id, e.section_id, s.name, s.handle FROM `sym_entries` AS `e` LEFT JOIN `sym_sections` AS `s` ON (s.id = e.section_id) WHERE e.id IN (); [0.0000]\r\n```","comments":1,"title":"Broken caching/entry retrieval","updated_at":"2011-10-26T11:56:13Z","url":"https://api.github.com/repos/symphonycms/selectbox_link_field/issues/12","id":2028257,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/5276fef3d61d45ad0d903c7521d7bc86?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5276fef3d61d45ad0d903c7521d7bc86","url":"https://api.github.com/users/designermonkey","id":221344,"login":"designermonkey"},"html_url":"https://github.com/symphonycms/selectbox_link_field/issues/12","labels":[],"state":"open"},"legacy":{"issue_id":2028257,"comment_id":2529410}}