Advanced Search Query with multiple INNER JOIN doesn't work as expected?

I'm unclear as to exactly what data you want back, but I think maybe you should join from the transactions into the members (just once) and then do some grouping to count orders (if that's what you're after). Also note that AND is evaluated before OR - so the final OR statement stands against all the AND's evaluated together. Use parentheses () to group your OR/AND/BETWEEN statements correctly.

Wow, I totally forgot about it. This solved the problem. (t.

Creator_admin_id = '45677' OR t. Member_id = '45677') thank you very much for your help. – Pixeler Oct 29 at 19:04.

Your inner join: INNER JOIN asw_members as mm ON mm. Id = t. Member_id already guarantees that t.

Member_id = mm. Id so adding the exact same condition in the where clause in the OR statement guarantees you'll get the full set based on the joins alone. See above answer about parentheses.

If mm is the reseller and m is the member, I think you want the following: INNER JOIN asw_members as mm ON (mm. Id = t. Member_id OR t.

Member_id = mm. Id) Then in your WHERE clause: m. Reseller_id = mm.Id AND s.

Reseller_id = mm. Id AND mm.Id = '45677' AND .... Sometimes if you are going to join a table in twice, you might want to shorthand your resellers as r and your members as m. It makes it easier to remember who is who.

Thank you for your help. I wanted to rest before checking it out again. Unfortunately INNER JOIN asw_members as mm ON (mm.Id = t.

Member_id OR t. Member_id = mm.Id) didn't do the trick :( I'm still getting all the orders of all reseller's members. – Pixeler Oct 29 at 19:02.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions