BR
asked on
sql sentence
Dear Experts,
I need to add where clause to below sql statement. I use PHP and mysql
I'd like to add WHERE a.onay='1' to the sql statement ( onay coloumn is on the first table )
where should I add it? I added it before LIMIT clause, but it didn't work.
I need to add where clause to below sql statement. I use PHP and mysql
I'd like to add WHERE a.onay='1' to the sql statement ( onay coloumn is on the first table )
where should I add it? I added it before LIMIT clause, but it didn't work.
$sql9 = "SELECT a.id, a.sehir, a.uid, a.baslik, a.kategori, a.fiyat, a.icerik, a.telefon, a.sontarih, a.onay ,b.ilanid ,b.resim
FROM ilan a
LEFT JOIN
(
SELECT ilanid, MAX(resim) resim
FROM resimler
GROUP BY ilanid
DESC
)b ON a.id = b.ilanid LIMIT $start_from, $per_page";
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER