1
this is the sql statement i want..
SELECT * FROM `xoops2_users` JOIN xoops2_groups_users_link ON xoops2_users.uid = xoops2_groups_users_link.uid WHERE xoops2_groups_users_link.groupid = '2' AND user_mailok >= '0' AND level > '0'
MyCode:
$criteria = new CriteriaCompo();
~~~~~~
if ( !empty($_POST['by_group']) && is_numeric($_POST['by_group']) ) {
$criteria->add(new Criteria('JOIN xoops2_groups_users_link ON xoops2_users.uid = xoops2_groups_users_link.uid WHERE xoops2_groups_users_link.groupid', intval($_POST['by_group']), '=',''));
}
$member_handler =& xoops_gethandler('member');
$total = $member_handler->getUserCount($criteria);
~~
$foundusers =& $member_handler->getUsers($criteria, true);
$total and $foundusers are not working since they both using method that are using the renderWhere() method from the criteria (CriteriaCompo class).. but.. using the render() method will not work either since it also adds parentheses..
.example..
SELECT *FROM `xoops2_users` WHERE (JOIN xoops2_groups_users_link ON xoops2_users.uid = xoops2_groups_users_link.uid WHERE xoops2_groups_users_link.groupid = '2' AND user_mailok >= '0' AND level > '0')
anyone got any ideas on how to make it work?! or a different way to make it work?!
CBB / LatestNews / Publisher / XM-Spotlight
(ノ◕ヮ◕)ノ*:・゚✧