当前位置: 首页>>代码示例>>PHP>>正文


PHP dbex::getRow方法代码示例

本文整理汇总了PHP中dbex::getRow方法的典型用法代码示例。如果您正苦于以下问题:PHP dbex::getRow方法的具体用法?PHP dbex::getRow怎么用?PHP dbex::getRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dbex的用法示例。


在下文中一共展示了dbex::getRow方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: message_set_remind

function message_set_remind($touid, $content, $link, $type, $is_focus)
{
    $uid = get_sess_userid();
    $userico = get_sess_userico();
    $uname = get_sess_username();
    global $tablePreStr;
    $t_remind = $tablePreStr . "remind";
    $dbo = new dbex();
    dbplugin('w');
    $content = htmlspecialchars_decode($content);
    $link = htmlspecialchars_decode($link);
    if ($is_focus == 0) {
        $update_con = " and type_id = {$type} ";
    } else {
        $update_con = " and link = '{$link}' ";
    }
    $sql_check = " select id from {$t_remind} where user_id={$touid} {$update_con} ";
    $is_set = $dbo->getRow($sql_check);
    if (empty($is_set)) {
        $sql = " insert into {$t_remind} (user_id,type_id,date,content,is_focus,from_uid,from_uname,from_uico,link) values ({$touid},{$type},NOW(),'{$content}',{$is_focus},{$uid},'{$uname}','{$userico}','{$link}') ";
    } else {
        $sql = " update {$t_remind} set count = count+1,date = NOW() where user_id = {$touid} {$update_con} ";
    }
    return $dbo->exeUpdate($sql);
}
开发者ID:omusico,项目名称:Social,代码行数:25,代码来源:message_set.php

示例2: user_get_user_point

function user_get_user_point($user_id)
{
    global $tablePreStr;
    $t_users = $tablePreStr . "users";
    $result_rs = array();
    $dbo = new dbex();
    dbplugin('r');
    $sql = "select user_point from {$t_users} where user_id={$user_id}";
    $result_rs = $dbo->getRow($sql);
    return $result_rs['user_point'];
}
开发者ID:omusico,项目名称:Social,代码行数:11,代码来源:user_get.php

示例3: user_self_by_total

function user_self_by_total()
{
    global $tablePreStr;
    $t_user = $tablePreStr . "users";
    $result_rs = array();
    $dbo = new dbex();
    dbplugin('r');
    $sql = "select count(*) as total from {$t_user}";
    $result_rs = $dbo->getRow($sql);
    return $result_rs['total'];
}
开发者ID:omusico,项目名称:Social,代码行数:11,代码来源:user_self.php

示例4: code_exists

function code_exists()
{
    $is_admin = '';
    $sendor_id = '';
    $admin_id = get_session('admin_id');
    if ($admin_id) {
        $is_admin = 1;
        $sendor_id = $admin_id;
    } else {
        $user_id = get_sess_userid();
        if (!$user_id) {
            return false;
            exit;
        }
        $is_admin = 0;
        $sendor_id = $user_id;
    }
    if ($sendor_id != '' && $is_admin !== '') {
        global $inviteCodeValue;
        global $tablePreStr;
        global $inviteCodeLength;
        $t_invite_code = $tablePreStr . "invite_code";
        $t_users = $tablePreStr . "users";
        if ($is_admin == 0) {
            $user_info = api_proxy('user_self_by_uid', 'integral', $sendor_id);
            $intg = $user_info['integral'];
            if ($inviteCodeValue > $intg) {
                return false;
            }
        }
        $dbo = new dbex();
        dbplugin('r');
        $invite_code = randkeys($inviteCodeLength);
        $sql = "select id from {$t_invite_code} where code_txt='{$invite_code}'";
        $is_exists = $dbo->getRow($sql);
        if ($is_exists['id']) {
            code_exists();
        } else {
            $time = time();
            $sql = "insert into {$t_invite_code} (sendor_id,code_txt,is_admin,add_time) values({$sendor_id},'{$invite_code}',0,{$time})";
            $success = $dbo->exeUpdate($sql);
            if ($success) {
                if ($is_admin == 0) {
                    $sql = "update {$t_users} set integral=integral-{$inviteCodeValue} where user_id={$sendor_id}";
                    $dbo->exeUpdate($sql);
                }
                return $invite_code;
            } else {
                return false;
            }
        }
    }
}
开发者ID:omusico,项目名称:Social,代码行数:53,代码来源:produce_rand.php

示例5: message_get_remind_count

function message_get_remind_count($uid = '')
{
    $uid = intval($uid);
    $result_rs = array();
    $dbo = new dbex();
    dbplugin('r');
    $uid = $uid ? $uid : get_sess_userid();
    global $tablePreStr;
    $t_remind = $tablePreStr . "remind";
    $sql = "select count(*) from {$t_remind} where user_id={$uid} and is_focus=1";
    return $dbo->getRow($sql);
}
开发者ID:omusico,项目名称:Social,代码行数:12,代码来源:message_get.php

示例6: check_pri

function check_pri($holder, $exp = '')
{
    $sess_uid = get_sess_userid();
    $is_admin = get_sess_admin();
    if ($sess_uid != $holder && !$is_admin) {
        if ($exp) {
            if (!$sess_uid) {
                return false;
            }
            if ($exp == '!all') {
                //全否定
                return false;
            }
            if (strpos(",{$exp}", "{")) {
                //限定人
                $per_str = preg_replace("/{([,\\d]+)}/", "\$1", $exp);
                if (strpos(",{$per_str}", ",{$sess_uid},")) {
                    return true;
                }
            }
            if (strpos(",{$exp}", "[")) {
                //限定组
                $sort_str = preg_replace("/\\[([,\\d]+)\\]/", "\$1", $exp);
                global $dbo;
                global $tablePreStr;
                global $dbServs;
                if (!$dbo) {
                    $dbo = new dbex();
                    dbplugin('r');
                }
                $table = $tablePreStr . "pals_mine";
                $sql = "select pals_sort_id from {$table} where pals_id={$sess_uid} and user_id={$holder}";
                $sort_id = $dbo->getRow($sql);
                $sess_sort_id = $sort_id['pals_sort_id'];
                if (strpos(",{$sort_str}", ",{$sess_sort_id},")) {
                    return true;
                }
            }
        } else {
            return true;
        }
    } else {
        return true;
    }
}
开发者ID:omusico,项目名称:Social,代码行数:45,代码来源:trans_pri.php

示例7: tag_del

function tag_del($tag_data)
{
    if ($tag_data) {
        global $tablePreStr;
        global $dbo;
        $table = $tablePreStr . "tag";
        $dbo = new dbex();
        dbplugin('w');
        foreach ($tag_data as $rs) {
            $sql = "select count from {$table} where id={$rs}";
            $tag_info = $dbo->getRow($sql);
            if ($tag_info['count'] == 1) {
                $sql = "delete from {$table} where id={$rs}";
                $dbo->exeUpdate($sql);
            } else {
                $sql = "update {$table} set count=count-1 where id={$rs}";
                $dbo->exeUpdate($sql);
            }
        }
    }
}
开发者ID:omusico,项目名称:Social,代码行数:21,代码来源:ftag.php

示例8: dbex

    $reTurnTxt = $m_langpackage->m_out;
    $reTurnUrl = "modules.php?app=msg_moutbox";
    $mess_id = $msg_row['mess_id'];
    if ($msg_row['state'] == "0") {
        $reButTxt = $m_langpackage->m_b_sed;
        $reButUrl = "do.php?act=msg_send&to_id={$mess_id}";
    } else {
        $reButTxt = $m_langpackage->m_b_con;
        $reButUrl = $reTurnUrl;
    }
} else {
    $dbo = new dbex();
    //读写分离定义函数
    dbtarget('r', $dbServs);
    $sql = "select mess_title,mess_content,from_user_id,from_user,from_user_ico,add_time,mesinit_id,mess_id,readed " . "from {$t_msg_inbox} where mess_id='{$msg_id}'";
    $msg_row = $dbo->getRow($sql);
    $relaUserStr = $m_langpackage->m_from_user;
    $reTurnTxt = $m_langpackage->m_in;
    $reButTxt = $m_langpackage->m_b_com;
    $reTurnUrl = "modules.php?app=msg_minbox";
    $mess_id = $msg_row['mess_id'];
    $from_user_id = $msg_row['from_user_id'];
    $mess_title = $msg_row['mess_title'];
    $mesint_id = $msg_row['mesinit_id'];
    $reButUrl = "modules.php?app=msg_creator&2id={$from_user_id}&rt=" . urlencode($mess_title);
    if ($type == '2') {
        $send_join_js = "mypals_add({$from_user_id});";
        $reTurnUrl = "modules.php?app=msg_notice";
        $reButTxt = $m_langpackage->m_b_bak;
        $reTurnTxt = $m_langpackage->m_to_notice;
        $reButUrl = $reTurnUrl;
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:rpshow.php

示例9: dbex

if ($allowReg == false) {
    $is_show = 0;
    $error_str = $u_langpackage->u_not_open_register;
} else {
    if ($inviteCode == 1) {
        $invite_code = get_argg('invite_code');
        if (strlen($invite_code) == $inviteCodeLength) {
            $t_invite_code = $tablePreStr . "invite_code";
            $dbo = new dbex();
            dbtarget('r', $dbServs);
            $now_time = time();
            $left_time = $inviteCodeLife * 60 * 60;
            $sql = "delete from {$t_invite_code} where {$now_time}-add_time > {$left_time}";
            $dbo->exeUpdate($sql);
            $sql = "select id from {$t_invite_code} where code_txt='{$invite_code}'";
            $is_check = $dbo->getRow($sql);
            if (empty($is_check)) {
                $error_str = $u_langpackage->u_invite_incorrect_or_failed;
                $is_show = 0;
            } else {
                $is_show = 1;
            }
        } else {
            $is_show = 0;
            $error_str = $u_langpackage->u_need_invite_register;
        }
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:user_reg.php

示例10: intval

    }
} else {
    //变量取得
    if (empty($photo_id)) {
        $photo_id = intval(get_argg('pid'));
        $album_id = intval(get_argg('aid'));
        $user_id = intval(get_argg('uid'));
    }
    //数据表定义区
    $t_album = $tablePreStr . "album";
    $t_photo = $tablePreStr . "photo";
    $dbo = new dbex();
    //读写分离定义函数
    dbtarget('r', $dbServs);
    $sql = "select * from {$t_photo} where photo_id={$photo_id}";
    $photo_row = $dbo->getRow($sql);
    $album_id = $photo_row['album_id'];
    $sql = "select * from {$t_album} where album_id={$album_id}";
    $album_row = $dbo->getRow($sql);
    //读写分离定义函数
    dbtarget('w', $dbServs);
    //删除照片
    if ($album_row['album_skin'] == $photo_row['photo_thumb_src']) {
        $album_skin = 'uploadfiles/album/logo.jpg';
        $sql = "update {$t_album} set album_skin = '{$album_skin}' where album_id={$album_id}";
        $dbo->exeUpdate($sql);
    }
    @unlink('../' . $photo_row['photo_src']);
    @unlink('../' . $photo_row['photo_thumb_src']);
    $sql = "delete from {$t_photo} where photo_id={$photo_row['photo_id']}";
    if ($dbo->exeUpdate($sql)) {
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:photo_del.action.php

示例11: reportlp

//数据表定义区
$t_report = $tablePreStr . "report";
//引入语言包
$rp_langpackage = new reportlp();
$dbo = new dbex();
//变量区
$type = intval(get_argg('type'));
$user_id = get_sess_userid();
$user_name = get_sess_username();
$userd_id = intval(get_argg('uid'));
$reason = short_check(get_argp('reason'));
$mod_id = intval(get_argg('mod_id'));
$t_report = $tablePreStr . "report";
dbtarget('r', $dbServs);
$sql = "select user_id from {$t_report} where reported_id={$mod_id} and type={$type}";
$report_row = $dbo->getRow($sql);
if ($report_row) {
    if ($user_id == $report_row['user_id']) {
        echo $rp_langpackage->rp_no_repeat;
        exit;
    } else {
        dbtarget('w', $dbServs);
        $sql = "update {$t_report} set rep_num=rep_num+1 where reported_id={$mod_id} and type={$type}";
        if ($dbo->exeUpdate($sql)) {
            echo 'true';
        } else {
            echo $rp_langpackage->rp_los;
            exit;
        }
    }
} else {
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:report_add.action.php

示例12: pals_self_isset

function pals_self_isset($holder_id, $pals_id = '')
{
    global $tablePreStr;
    $t_pals = $tablePreStr . "pals_mine";
    $result_rs = array();
    $pals_id = $pals_id ? $pals_id : get_sess_userid();
    if ($pals_id) {
        $dbo = new dbex();
        dbplugin('r');
        $sql = "select id from {$t_pals} where user_id={$holder_id} and pals_id={$pals_id}";
        $result_rs = $dbo->getRow($sql);
    } else {
        $result_rs = 0;
    }
    return $result_rs;
}
开发者ID:omusico,项目名称:Social,代码行数:16,代码来源:pals_self.php

示例13: paper_get_is_owned_user

function paper_get_is_owned_user($user_id, $paper_id)
{
    global $tablePreStr;
    $t_papers = $tablePreStr . "papers";
    //评论类型
    $comment_type = 1;
    $result_rs = array();
    $dbo = new dbex();
    dbplugin('r');
    $sql = "select * from {$t_papers} where paper_id={$paper_id} and user_id={$user_id}";
    $result_rs = $dbo->getRow($sql);
    return empty($result_rs) ? 0 : 1;
}
开发者ID:omusico,项目名称:Social,代码行数:13,代码来源:paper_get.php

示例14: dbex

<?php

require "session_check.php";
$user_id = get_argg('user_id');
$dbo = new dbex();
dbtarget('w', $dbServs);
//引入语言包
$m_langpackage = new modulelp();
$ad_langpackage = new adminmenulp();
//表定义区
$t_users = $tablePreStr . "users";
$sql = "select user_name,user_ico,user_marry,user_qq,user_blood,birth_province,birth_year, birth_city ,reside_province , reside_city,user_email from {$t_users} where user_id='{$user_id}'";
$member_info = $dbo->getRow($sql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" media="all" href="css/admin.css">
</head>

<body>
<div id="maincontent">
    <div class="wrap">
        <div class="infobox">
            <h3><?php 
echo $member_info['user_name'];
echo $m_langpackage->m_information;
?>
</h3>
            <div class="content">
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:user_info.php

示例15: dbex

//判断是否批量删除
if (get_argp('checkany')) {
    //批量
    $dbo = new dbex();
    dbtarget('r', $dbServs);
    dbtarget('w', $dbServs);
    $album_ids = get_argp('checkany');
    foreach ($album_ids as $rs) {
        $t_album = $tablePreStr . "album";
        $t_photo = $tablePreStr . "photo";
        $t_photo_comment = $tablePreStr . "photo_comment";
        $t_album_comment = $tablePreStr . "album_comment";
        $sql = "select * from {$t_photo} where album_id={$rs}";
        $photo_rs = $dbo->getRs($sql);
        $sql = "select * from {$t_album} where album_id={$rs}";
        $user_id = $dbo->getRow($sql);
        foreach ($photo_rs as $val) {
            @unlink('../' . $val['photo_src']);
            @unlink('../' . $val['photo_thumb_src']);
            increase_integral($dbo, $int_del_photo, $user_id);
            //删除照片相关评论
            $photo_id = $val['photo_id'];
            $sql = "delete from {$t_photo_comment} where photo_id ={$photo_id}";
            $dbo->exeUpdate($sql);
        }
        //删除相册有关照片
        $sql = "delete from {$t_photo} where album_id={$rs}";
        $dbo->exeUpdate($sql);
        //删除相册相关评论
        $sql = "delete from {$t_album_comment} where album_id={$rs}";
        $dbo->exeUpdate($sql);
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:album_del.action.php


注:本文中的dbex::getRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。