Simple Machines Blogs > Developers' Blog

Database Changes in SMF 2.0 - Part 2

<< < (15/15)

codenaught:
For the second query, you could try something like this:


--- Code: ---// array for the member ID's
$team = array();

// get all members of group 1 (administrators)
$group = 2;
$res = $smcFunc['db_query']('', 'SELECT id_member
                FROM {db_prefix}members
WHERE ID_GROUP = {int:group}',
array(
'group' => $group,
)
);
while ($row = $smcFunc['db_fetch_assoc']($res))
        $team[] = $row['id_member'];
$smcFunc['db_free_result']($res);
--- End code ---

Edited: Fixed mistake causing it not to work.

Owdy:
First one worked :)

Second one:

Fatal error: Function name must be a string in /var/www/fs1/0/public_html/foorumi/Sources/Load.php(1857) : eval()'d code on line 45

Thantos:
Please start a topic in the SMF Coding Discussion board.  Thanks

Owdy:
Okay. Sorry T for hijacking this topic.

Navigation

[0] Message Index

[*] Previous page

Go to full version