mgsmus Cevabınız için teşekkür ederim hocam MySQL kullanıyorum fakat şöyle bir problemim var inner join ile sorgu işlemini halledebildim fakat bu seferde where koşulunu artırınca istediğim sonuçları döndürmüyor.
Kodum :
$query = Advertisements::whereIn('categoryId', $ids);
$query->join("ads_to_properties", function ($join) {
$join->on("advertisements.id", "=", "ads_to_properties.adsId")
->where("ads_to_properties.featureId", "=", 3)
->where("ads_to_properties.variable", "=", 'Otomatik')
->where("ads_to_properties.featureId", "=", 5)
->where("ads_to_properties.variable", "=", 'Sedan');
});
$advertisements = $query->where('isActive', 1)
->simplePaginate(20);
return $advertisements;
Sorunum şu şimdi aynı anda hem 3 nolu hem 5 nolu özellikten where koşulu koydum tek olunca sıkıntı olmuyor doğru sonuç dönüyor fakat ikisi girince işin içine sonuçlar çok alakasız dönüyor.