就像现在我有这个php查询:
$query = "SELECT listing_id, order_expires FROM #__jreviews_paid_orders
WHERE order_id=".$orderid;
我想添加以下条件 - - > order_never_expires!= 1
所以我试过
SELECT listing_id, order_expires FROM #__jreviews_paid_orders
WHERE order_never_expires != '1' && order_id=".$orderid;
还有:
SELECT listing_id, order_expires FROM #__jreviews_paid_orders
WHERE order_id=".$orderid && order_never_expires != '1';
但它不起作用......想法?
非常感谢您的建议
答案 0 :(得分:0)
尝试以下查询。
SELECT listing_id, order_expires FROM #__jreviews_paid_orders
WHERE order_id=".$orderid.” AND order_never_expires != '1';
您需要用双引号括起变量。