select destinaions.* , dest_types.Name as typeName ,(select Img from destination_imgs where Destination = destinaions.Id limit 0,1 ) as Thum , regions.Slug as regionName , countries.countries_name from destinaions join dest_countries on destinaions.Id=dest_countries.Destination join countries on countries.countries_id=dest_countries.IdCountry join regions on countries.regiond=regions.Id join dest_types on dest_types.Id=destinaions.TourType where DestType in ( 'destination' , 'destination_cruise' ) and destinaions.Active=0 and TourType= and destinaions.Id!= group by destinaions.Id order by rand() limit 0,4
Mysql Error Number 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and destinaions.Id!= group by destinaions.Id order by rand() limit 0,4' at line 1