| Re: Xoops Variables question |
| by Cuidiu on 2006/7/10 22:12:47 [/quote]This thread perhaps. [quote]Bender wrote: There was a topic covering usergroups within the last 2 weeks. For the moment i don´t remember who asked/answered but using the search might be adviseable. |
| Re: Xoops Variables question |
| by Bender on 2006/7/10 21:44:30 There was a topic covering usergroups within the last 2 weeks. For the moment i don´t remember who asked/answered but using the search might be adviseable. The topic was especially about the handling of custom XOOPS groups iirc. |
| Re: Xoops Variables question |
| by flameshockey on 2006/7/10 20:51:34 I decided to echo those variables and found out the numbers as well, i think i'm going to try and find out what group corrseponds to each number and do: global $xoopsUser; if $xoopsUser=#10, depaul=#10 if $xoopsUser = depaul, SELECT schedule WHERE table=depaul i think i may try this |
| Re: Xoops Variables question |
| by Cuidiu on 2006/7/10 20:44:19 Quote: what are the names for variables for XOOPS groups I have wondered this myself. I did discover groups have id numbers assigned to them but could not figure out how to use groupid for separating groups. Then again, I'm not a coder, so that doesn't surprise me. ![]() groupid | name 1 | Webmasters 2 | Registered Users 3 | Anonymous Users 4 | 4th User Group |
| Re: Xoops Variables question |
| by flameshockey on 2006/7/10 20:26:49 I tried that, but I am not sure how the function is actually used in the .php file. Here is what I Have: filename:index.php // other stuff before here function viewsched() { global $xoopsDB, $xoopsUser; $groups = $xoopsUser->getGroups(); $table = $xoopsDB->prefix( 'game_schedule' ); $query = $xoopsDB->query( "SELECT * FROM $table WHERE home IN( " . implode( ',', $groups ) . ") ORDER BY date ASC" ); } ------------------------- This is the old code where each team had their own .php file to view and add games, now I want only one file to do this // Define query and make sure the right team name is selected!! //$query = 'SELECT * FROM game_schedule WHERE (home = "Depaul") ORDER BY date ASC'; -------------------------- if ($result = mysql_query($query)) { while ($row = mysql_fetch_array($result)) { echo the selected MySQL data in html table }// end while }// end if |