Query Error:

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 'AND tblSlide.ShowID = tblSlideShow.ShowID AND tblSlideShow.Active = 'Y' ' at line 4

The query attempting to execute was:
SELECT ImageName, Caption FROM tblSlide, tblSlideShow WHERE tblSlideShow.ShowID = AND tblSlide.ShowID = tblSlideShow.ShowID AND tblSlideShow.Active = 'Y' AND ImageName <> 'thumbnails' AND ImageName <> 'mcith' ORDER BY tblSlide.SortOrder;

Script failed on line 35