[英]How to select results from table where `cat` = '$cat' and if it's not then select all from `cat` no matter what $cat is
如何從cat
='$ cat'的表中選擇結果,如果不相等,則無論$ cat是什么,都從cat
全選。 這是我的查詢
$sql = mysql_query("SELECT * FROM `obiavi` WHERE `postdate`+`days`*86400 > $time AND `town` IN ('$oblasti') AND `desc` LIKE '%$keyword%' ORDER BY id DESC LIMIT $start, $perpage") or die (mysql_error());
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.