SELECT distinct `tag_index`.`type` FROM `tag_index` LEFT JOIN `tags` ON `tags`.`id`=`tag_index`.`tag_id` WHERE `tags`.`title`='L'ONE'

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ONE'' at line 7