last modification including canceled item

More
5 years 5 months 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 :
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.

More
5 years 4 months ago #76901 by tonnick
no idea here ? ;(

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

More
5 years 4 months 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
Time to create page: 0.739 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline