complex query

cornelio 14 Jul, 2015
Hi,

I have a select query that uses more join (model),
I would like to add a sql statement like this
SELECT (TO_DAYS(date1)-TO_DAYS(date2)) diff_field_name
and retrieve the value of the field diff_field_name in the list of columns.
how is this possible without using a custom query?

regards
cornelio
GreyHead 15 Jul, 2015
Hi cornelio,

It looks as if this is a ChronoConnectivity question posted in the ChronoForms forum?

My guess is that this will work in the CC Conditions box - though the MySQL needs cleaning up a bit. Have you tested it?

Bob
cornelio 15 Jul, 2015
Hi Bob,
sorry for posting on the wrong forum!

yes, I tested the code on CC Conditions box and it works perfectly, but I have to take the field in the query and put it in the table model.field, otherwise I have to write all custom code

Cornelio
This topic is locked and no more replies can be posted.