Пример #1
0
function getPals_mine_base($dbo, $select_items, $t_pals, $userid, $accpara, $limit)
{
    $acceptedStr = '';
    if ($limit != '') {
        $limit = 'LIMIT ' . $limit;
    }
    if ($accpara == 1) {
        $acceptedStr = ' and accepted>=1 ';
    }
    $si_item_sql = get_select_item_sql($select_items);
    $sql = "select {$si_item_sql} from {$t_pals} where user_id='{$userid}' {$acceptedStr} order by add_time desc {$limit}";
    return $dbo->getRs($sql);
}
Пример #2
0
function get_user_info_item($dbo, $select_items, $t_user, $uid)
{
    $si_item_sql = get_select_item_sql($select_items);
    $sql = "select {$si_item_sql} from {$t_user} where user_id={$uid}";
    return $dbo->getRow($sql);
}