I am not the best at sql and php, but.
I am easier with .net apps and sql query.
How do you include or exlude a specific list of items based on a set id like “cat_id”, exlude specifi cat_id?
What is correct way to write it?
$db =& JFactory::getDBO();
$query = " SELECT
*
FROM
".$db->nameQuote('#__community_videos')."
WHERE
".$db->nameQuote('published')."=".$db->quote(1)."
AND
".$db->nameQuote('permissions')."=".$db->quote(0)."
AND NOT
".$db->nameQuote('cat_id')."=".$db->quote(5)."
ORDER BY
".$db->nameQuote('created')." DESC
LIMIT
".$limit;
$db->setQuery( $query );
$result = $db->loadObjectList();