0

I have 2 paramters ( $memberparamter and $rest_id), that i am getting from the user. But every time my server runs the statement, it does not find anything. I have double checked with my database, and it says the desired output, does exist. If i delete one of the where clause, it works great.

Have i done it the wrong way?

This is my sql statement:

  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
4

2 に答える 2

1

問題を修正する where句を指定する必要があります。私が推測するなら、あなたのスペルが間違っていると推測します。コード内で「パラメータ」を正しく綴るという信念に基づいて、'$memberparamter'実際にはそうあるべきです。'$memberparameter'

于 2013-07-01T13:26:07.940 に答える
0

問題を引き起こしているのはGROUP BYですか?SELECT 列を集計していないのに、なぜ GROUP BY があるのですか?

于 2013-07-01T13:11:59.623 に答える