Hi all,
I'm having some problems with adding a select clause... it seems as if Torque is adding a FROM clause that is inappropriate, and I'm not sure why it's doing it.
I am using mysql and want to use some db-specific functions. I have no problems adding a select clause to my criteria like this:
crit.addSelectColumn("MAX("+TbldeliveryitemPeer.QUANTITYSHIPPED+")");That gives me a nice MAX. However, if I do something like this:
crit.addSelectColumn("TO_DAYS(max("+TbldeliveryPeer.INVOICEDATE+"))");Then the query that torque spits out adds that to the select clause appropriately, but then for some reason changes my FROM clause and appends this string to it:
max(tbldelivery
Just before the WHERE clause starts. I have no idea what it's doing, but i seems to be just taking a slice of my select clause (it doesn't even close off the parentheses) and generates obviously bad SQL that the database can't use. I'm using Torque 3.0.2. If this is fixed in a later release I'd possibly upgrade, but last time I tried I remember it being fairly painful.
Thanks! Tom
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
