The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I'm pretty new to php coding, so bare with me.
What I'm trying to do is create in CMS a php direct evaluation evalutaion page that lists users from a certain usergroup. Currently I've got this as code Code:
$test=$db->query_read(SELECT userid,username from user WHERE usergroupid=10 ORDER BY username);
$output = "testusers<br />";
while ($row = $db->fetch_array($test)) {
$output .= "$row['username']<br />";
};
$output .= "done<br />";
Anybody that can push me in the right direction ? |
|
#2
|
|||
|
|||
|
Try this:
Code:
global $db;
$test=$db->query_read("SELECT userid,username from user WHERE usergroupid=2 ORDER BY username");
$output = "testusers<br />";
while ($row = $db->fetch_array($test)) {
$output .= $row['username'] . '<br />';
};
$output .= "done<br />";
|
| 2 благодарности(ей) от: | ||
| Lynne, ProFifaLeagues | ||
|
#3
|
|||
|
|||
|
Or how simple things can be...
That worked. Thanks ! |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|