SQL error:Got error 28 from table handler query:SELECT DISTINCT
gl_toursSupercategories.toursSupercategoriesId,
gl_toursSupercategories.color,
gl_toursSupercategories.name,
gl_tour_st.id,
gl_tour_st.color,
gl_tour_st.name,
gl_works2.id,
gl_works2.name,
gl_works2.text,
gl_works2.data,
gl_works2.fly,
gl_works2.initCoast,
gl_works2.anons,
gl_works2.file,
gl_ToursPhotoGalleries.photoGallery IS NOT NULL,
gl_tour_st.text
FROM gl_toursSupercategories
JOIN gl_tour_st ON
gl_tour_st.supercategory=gl_toursSupercategories.toursSupercategoriesId AND
gl_toursSupercategories.isVisible AND
gl_tour_st.visible_ind='Y'
JOIN gl_works2 ON gl_works2.status=gl_tour_st.id AND gl_works2.visible='Y'
LEFT JOIN gl_ToursPhotoGalleries ON gl_ToursPhotoGalleries.tour=gl_works2.id
ORDER BY
gl_toursSupercategories.listOrder,
gl_toursSupercategories.toursSupercategoriesId,
gl_tour_st.num,
gl_tour_st.id,
gl_works2.num,
gl_works2.id