select DISTINCT * from q_packages AS P INNER JOIN q_coaches AS CH ON CH.co_id=P.p_coach 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 P.p_coach=images order by -P.p_id
Unknown column 'images' in 'where clause'