Conditional select?

QuestionsConditional select?
Scott Pratt asked 7 years ago

I'm trying to return only the highest revision number of each id. Ex:

id revision title comments more columns…
S11001 1 My Title etc.. etc.. … …
S11001 2 My Title etc.. etc.. … …
S11001 3 My Title etc.. etc.. … …
S11002 1 My Title etc.. etc.. … …
S11002 2 My Title etc.. etc.. … …
S11003 4 My Title etc.. etc.. … …
S11003 1 My Title etc.. etc.. … …
S11003 2 My Title etc.. etc.. … …
S11003 3 My Title etc.. etc.. … …

Should return:
S11001 3 My Title etc.. etc.. … …
S11002 2 My Title etc.. etc.. … …
S11003 4 My Title etc.. etc.. … …

I'm able to write a query that returns the results I need as expected (I stuffed it into execute_query() when it sees a select statement) but it breaks the grid and I can't sort, page or search the grid.

Also although the grid shows 212 results as expected in the bottom right, it shows Page 1 of 0.

1 Answers
Abu Ghufran answered 7 years ago

Hello Scott,

Can you send me the php grid code file, on which you are working.
I need to examine the sql, which you are passing to ->select_command.
Emai me at [email protected]

Thanks

Your Answer

18 + 12 =

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?