Maybe this will help: Array
(
[0] => 42000
[1] => 1064
[2] => 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 'rank as rk
ON rk.title_id = t.title_id
INNER JOIN source' at line 9
)
SELECT distinct left(t.title,1) as initial, t.title as newtitle, t.description, location, access_restrictions, t.title_id as this_record,eres_display, display_note, pre, citation_guide, ctags, helpguide
FROM title as t
INNER JOIN location_title as lt
ON t.title_id = lt.title_id
INNER JOIN location as l
ON lt.location_id = l.location_id
INNER JOIN restrictions as r
ON l.access_restrictions = r.restrictions_id
INNER JOIN rank as rk
ON rk.title_id = t.title_id
INNER JOIN source as s
ON rk.source_id = s.source_id
WHERE title LIKE 'D%'
AND eres_display = 'Y'
ORDER BY newtitle
A to Z Resouces