PDA

View Full Version : سوال: دستور Sql برای عدم نمایش مطلب یا خبر



naseri1152
پنج شنبه 05 مرداد 1396, 07:22 صبح
با توجه به دستور زیر چطوری بگم positiontypenews=2 خبرش نمایش نده یعنی اگر positiontypenews=2 این خبر نمایش داده نشود؟ چطور در دستور زیر اضافه کنیم؟

$sql = "select * from news where cat not in ".$cat." and st = 'showable' and position = 1 or position = 0 order by newsId DESC

MRmoon
پنج شنبه 05 مرداد 1396, 09:12 صبح
فقط در قسمت where اضافه کنید

positiontypenews!=2