Hello,
Using CCv5, I'm trying to use the next condition to filter only articles from logged user and from specific categories.
Nevertheless,categories are filtering OK but user->id are not working, and CCv5 is showing items from all the users.
What I'm doing wrong?
Using CCv5, I'm trying to use the next condition to filter only articles from logged user and from specific categories.
Nevertheless,categories are filtering OK but user->id are not working, and CCv5 is showing items from all the users.
What I'm doing wrong?
<?php
$user =& JFactory::getUser();
return array('UPNoticias.created_by' => $user->id, 'UPNoticias.catid' => ('4','6','27','36','69'));
?>
Hi Kronosites ,
If you add a Debugger action you will see the MySQL query that is being created - really useful when you need to debug the code.
The first condition looks OK to me though is should now be $user = \JFactory::getUser();
The second condition is broken as there is no IN there. Please try 'UPNoticias.catid IN' => ('4','6','27','36','69')
Bob
If you add a Debugger action you will see the MySQL query that is being created - really useful when you need to debug the code.
The first condition looks OK to me though is should now be $user = \JFactory::getUser();
The second condition is broken as there is no IN there. Please try 'UPNoticias.catid IN' => ('4','6','27','36','69')
Bob
Hi again GreyHead,
Using it doesn't work.
I was searching through the FAQs more harder (https://www.chronoengine.com/faqs/72-ccv5/5215-how-do-i-build-a-where-statement-in-ccv5.html)and I found the solution:
Thanks for all!
Your FAQs are really great😉
Using it doesn't work.
I was searching through the FAQs more harder (https://www.chronoengine.com/faqs/72-ccv5/5215-how-do-i-build-a-where-statement-in-ccv5.html)and I found the solution:
return array('created_by' => $user->id, 'UPNoticias.catid' => array('4','6','27','36','69'));
Thanks for all!
Your FAQs are really great😉
Hi Kronosites,
It's also advised to use v6 instead of v5 for more features and flexibility.
Best regards,
Max
It's also advised to use v6 instead of v5 for more features and flexibility.
Best regards,
Max
This topic is locked and no more replies can be posted.