Code: Select all
$sql="SELECT l.id lid, l.advertiser_id advertiser, l.title title, l.url url, l.displayurl display, l.description desc, l.adult adult, l.keywords keywords, l.maxb maxb, a.id id, a.balance balance FROM listing l ,advertiser a WHERE keywords LIKE '%$keyword%' and balance > 5 and advertiser=lid ORDER BY maxb DESC LIMIT $lim ";
it says:
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 'desc, l.adult adult, l.keywords keywords, l.maxb maxb, a.id id,
where i am wrong?