Forums

Retreive the last date/value of a linked table

webcrea 23 Jun, 2017
Hi,

Each fonds have several value : quotations with date (2 tables)

I want to retreive the last quotation in the table of fonds to display it like this

Name | Type | Date | Value
fond1 FCPI 28/9/16 195
fond2 FCPI 18/5/17 256
...etc

the read_data is ok, in debug i see all quotations but i can't display the last in the list
I don't know how to extract the max date with his quotation

thanks
Max_admin 25 Jun, 2017
Hi Christophe,

The quotations model relation to the first model should be set to "subquery join", and the in the fields to retrieve you will need to get a field with the function MAX(date_field_name):field_alias

Then you can use that field_alias in your table view

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
webcrea 25 Jun, 2017
Hi Max,

I solved this clue with a function because I need the max date and quotation with...

for each row I do a query...

Thanks
Regards
Max_admin 25 Jun, 2017
Hi Christophe,

Not the best solution but it may work fine when you do not have a lot of data.

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.