Is it possible to use an SQL formula for the ORDER BY column with
Torque? I was looking generated SQL something like this:
SELECT * FROM rules WHERE rules.type_id=3 ORDER BY abs(rules.year-2003)
LIMIT 1
(where the 3 and 2003 come from variables). This would give me the type
3 Rule object for the year closest to 2003.
I can simulate this by putting the ORDER BY clause in a custom SQL
Criteria entry, but that's a really ugly way of doing it.
Thanks,
Jon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]