last modification including canceled item

2 weeks 6 days ago #76757 by tonnick
I opened a case long time ago to ask how can we display the date of latest modification in a category list items. you gave me this code :
    $db = JFactory::getDbo();
    $catid = JFactory::getApplication()->input->getInt('cid');
    $query = 'SELECT modified FROM #__content AS c JOIN #__flexicontent_cats_item_relations AS rel ON = rel.itemid WHERE rel.catid = ' . (int) $catid .' ORDER BY modified DESC LIMIT 1';
    $most_recent_mod = $db->loadResult();
    print $most_recent_mod ;

This is doing perfectly the job for modified items. but this does not consider canceled items. I guess that the query has to be modified, but I cannot find the right way to do it. Would you help me here ?!

thx !

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.