Php problem
Posted: Mon Aug 21, 2006 7:29 am
feyd | Please use
Users can have more then 1 group and $groups array is list of all groups of a user.
The code i posted check only first group of a user
the sentence "AND b.gperm_groupid = $groups[0]" is probably the part i had to change but i don't now right sentence.
if you known how help me, please reply at support@softmerlino.com.
Thank you.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello. This is the first time i try using php language end i've a small problem.
In this module this function give me all categories that a user can access.Code: Select all
$result = $xoopsDB->query("SELECT a.*, b.* FROM " . $xoopsDB->prefix("PDdownloads{$mydirnumber}_cat") . " a, ".$xoopsDB->prefix('group_permission')." b WHERE a.cid = b.gperm_itemid AND b.gperm_modid = $module_id AND b.gperm_name = \"PDDownCatPerm{$mydirnumber}\" AND b.gperm_groupid = $groups[0] AND a.pid = 0 ORDER BY a.weight");Users can have more then 1 group and $groups array is list of all groups of a user.
The code i posted check only first group of a user
the sentence "AND b.gperm_groupid = $groups[0]" is probably the part i had to change but i don't now right sentence.
if you known how help me, please reply at support@softmerlino.com.
Thank you.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]