last modification including canceled item

3 months 1 week ago #76757 by tonnick
Hello
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 :
<?php
    $db = JFactory::getDbo();
    $catid = JFactory::getApplication()->input->getInt('cid');
    $query = 'SELECT modified FROM #__content AS c JOIN #__flexicontent_cats_item_relations AS rel ON c.id = rel.itemid WHERE rel.catid = ' . (int) $catid .' ORDER BY modified DESC LIMIT 1';
    $db->setQuery($query);
    $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.

2 months 1 week ago #76901 by tonnick
no idea here ? ;(

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

2 months 6 days ago #76906 by micker
you cant because modified value is for ordering and use a date, canceled is a state i think you can't mix it with this sql request

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.