Hello,
I want to query my locations table with CC to provide a list of equipment in a particular region. So, my query looks like this:
However, if a piece of equipment has been moved within the same region it will show up multiple times in my list and I only want to view the record with the latest move date. My date column is of the DATE type but I'm not sure that I can use the MAX() function in CC.
Is there a way to have only one of each record show up based on the max (latest) move date?
Thanks for your help.
Chris.
I want to query my locations table with CC to provide a list of equipment in a particular region. So, my query looks like this:
<?php
return array('region' => '1');
?>
However, if a piece of equipment has been moved within the same region it will show up multiple times in my list and I only want to view the record with the latest move date. My date column is of the DATE type but I'm not sure that I can use the MAX() function in CC.
Is there a way to have only one of each record show up based on the max (latest) move date?
Thanks for your help.
Chris.
Hi Chris,
Please see this FAQ - I think that the Complex query section at the end wll let you do this.
Bob
Please see this FAQ - I think that the Complex query section at the end wll let you do this.
Bob
Thanks for your reply Bob.
I had looked at that FAQ but was still unsure how to format the statement using MAX('date_moved'). Would it be part of the JRequest (which I'm not that familiar with). If there are some other references you can point me to that would be helpful.
Thanks again,
Chris
I had looked at that FAQ but was still unsure how to format the statement using MAX('date_moved'). Would it be part of the JRequest (which I'm not that familiar with). If there are some other references you can point me to that would be helpful.
Thanks again,
Chris
This topic is locked and no more replies can be posted.