select DISTINCT S.sp_id,S.sp_name from q_packages AS P
					  INNER JOIN q_club AS C ON C.cl_id=P.p_club
					  INNER JOIN q_sports AS S ON S.sp_id=P.p_spid 
					  where cl_status=1  and P.p_status=1 and S.sp_catid=images order by -P.p_id

Unknown column 'images' in 'where clause'