blob: ca1cd4b5ce89b0b56653d164b3f2c4db58f8ba69 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?php
require_once('common.inc.php');
function get_teamid($msqlc, $term, $uid)
{
$sqlstr = 'SELECT "teamid" FROM "sqmod_sprout_team" WHERE "term"=$1 AND "uid"=$2;';
$sqlarr = array($term, $uid);
$res = pg_query_params($sqlstr, $sqlarr);
$teamid = pg_fetch_result($res, 0);
return $teamid;
}
function get_team_member($msqlc, $term, $teamid)
{
$sqlstr = 'SELECT "uid", "level" FROM "sqmod_sprout_team" WHERE "term"=$1 AND "teamid"=$2 ORDER BY "level" DESC, "uid";';
$sqlarr = array($term, $teamid);
$res = pg_query_params($sqlstr, $sqlarr);
$ret = array();
while($obj = pg_fetch_object($res))
{
array_push($ret, $obj);
}
return $ret;
}
?>
|