SELECT g.* FROM gallery g WHERE g.d_id = public && type_id = 15 ORDER BY g.is_main DESC, g.id DESC. Unknown column 'public' in 'where clause'