我有 2 个参数($memberparamter和$rest_id),我从用户那里得到。但是每次我的服务器运行该语句时,它都找不到任何东西。我已经仔细检查了我的数据库,它说所需的输出确实存在。如果我删除其中一个 where 子句,效果很好。
我做错了吗?
这是我的sql语句:
SELECT
eso.order_id as order_id,
eso.member_id as member_id,
esoi.title as title,
dl.used_date as checked,
dl.order_item_id as order_item_id
FROM exp_store_orders as eso
inner join exp_store_order_items as esoi on (eso.order_id = esoi.order_id)
inner join exp_deal_keys as dl on dl.order_item_id = esoi.order_item_id
where eso.member_id = '$memberparamter' and esoi.entry_id = '$rest_id'
and eso.order_paid > 0
group BY eso.transaction_id
ORDER BY eso.transaction_id desc