Sergio asked 2 months ago

Query Union only looks in the first table of the union, but does not filter, but puts it in the first positions my code: https://github.com/keneve/keneve/blob/main/gestion_cobros some idea?

1 Answers
Abu Ghufran Staff answered 2 months ago


To work correctly, you need to make current union query as subquery of one select query. e.g.

    SELECT * FROM clients WHERE gender = 'male' 
    SELECT * FROM clients WHERE gender = 'female'
) as temp

This will apply the filter and sorting parameters to the outer most query and will give desired result.

Abu Ghufran - Dev Team
Grid 4 PHP Framework
Your Answer

19 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?