Hi group,

I'm a MySQL and Turbogears novice.  Looking for some help in setting
up a database query.  I'm trying to query a table by a specific field
(not unique), but only have the database return the most recent record
of any duplicate record.

For example:

Files
--------------------------------------
id   |   filename   |   date   |
--------------------------------------
1       foo.txt         12_07_2008
2       poo.txt        12_01_2008
3       foo.text       12_06_2008

I'd like to query the db so the resulting SearchResults object only
contains records 1 & 2.

I found some complex sql queries using inner joins, but couldn't
figure out how to use them with sqlobject.  I also tried to filter the
results of a full query, but came to dead ends.

files = model.Files.select(???)

Any help would be appreciated!

~Sean
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to