SELECT distinct (u.webname), u.userId, s.str_sname, u.uniqueId, u.shop_name, u.int_onoff, s.int_scategory, s.int_scategorytext, s.float_amount, s.mrp_price, s.int_id, s.currency_code, s.currency_symbol, CONVERT(s.str_likes USING utf8) as str_likes, pa.orderID, pa.name, s.unit FROM ( ( services s LEFT JOIN user u ON (s.int_uid = u.userId) ) LEFT JOIN photo_album pa ON (s.int_id = pa.sid) ) WHERE s.int_deleted != 1 AND(pa.orderID = 1) AND s.int_id in(53021,53022,53023,53024,53025,53026,53027,53028,53029,53030,53031) order by rand()