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


PHP MySQL::closeCon方法代码示例

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


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

示例1: getIconByName

 public static function getIconByName($name)
 {
     $sql = "select icon from emotion where value='" . $name . "'";
     $mysql = new MySQL();
     $res = $mysql->executeReturnFirstObj($sql);
     $mysql->closeCon();
     return $res;
 }
开发者ID:Hank-wood,项目名称:meizizhi,代码行数:8,代码来源:EmotionService.php

示例2: getPage

 public static function getPage($pageid)
 {
     $sql = "select a.id,a.pageid,a.title,a.viewnum,a.cover,a.imgnum,a.disnum,a.praisenum,a.status,a.cuserid,a.cusername,\n                a.cdate,a.udate ,b.img\n                from page a left join  page_img b\n                on a.pageid=b.pageid  where a.pageid=" . $pageid;
     $mysql = new MySQL();
     $res = $mysql->executeReturnObj($sql);
     $mysql->closeCon();
     return $res;
 }
开发者ID:Hank-wood,项目名称:meizizhi,代码行数:8,代码来源:PageService.php

示例3: insertDiscuss

 public static function insertDiscuss($disObj)
 {
     $mysql = new MySQL();
     $res = $mysql->insert("page_discs", $disObj);
     $mysql->closeCon();
     PageService::updateDisNum($disObj['pageid']);
     return $res;
 }
开发者ID:Hank-wood,项目名称:meizizhi,代码行数:8,代码来源:DiscussService.php

示例4: getUser

 public static function getUser($user)
 {
     $mysql = new MySQL();
     $where = " (email='" . $user['user'] . "' or tel='" . $user['user'] . "') and password='" . $user['password'] . "'";
     $fd = array("userid,username,email,tel");
     $res = $mysql->selectOne("user", $where, $fd);
     $mysql->closeCon();
     return $res;
 }
开发者ID:Hank-wood,项目名称:meizizhi,代码行数:9,代码来源:UserService.php

示例5: getSequence

 public static function getSequence($seqType)
 {
     $replace_sql = "replace into sequence(seqname) VALUES('" . $seqType . "')";
     $mysql = new MySQL();
     $mysql->execute($replace_sql);
     $get_sql = "select seq from sequence where seqname='" . $seqType . "'";
     $res = $mysql->executeReturnFirstObj($get_sql);
     $seq = $res['seq'];
     $mysql->closeCon();
     return $seq;
 }
开发者ID:Hank-wood,项目名称:meizizhi,代码行数:11,代码来源:SequenceHelper.php

示例6: dirname

header("Content-type: text/html; charset=utf-8");
session_start();
set_time_limit(0);
require_once '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'Config.php';
require_once dirname(dirname(dirname(__FILE__))) . PATH . "includes" . PATH . 'dao' . PATH . 'MySQL.php';
$data = $_POST['dd'];
if (!empty($data)) {
    $mysql = new MySQL();
    $objs = json_decode($data);
    //    echo count($objs);exit;
    foreach ($objs as $d) {
        $insertData['phrase'] = $d->phrase;
        $insertData['type'] = $d->type;
        $insertData['url'] = $d->url;
        $insertData['hot'] = $d->hot;
        $insertData['common'] = $d->common;
        $insertData['category'] = $d->category;
        $insertData['icon'] = $d->icon;
        $insertData['value'] = $d->value;
        $insertData['picid'] = $d->picid;
        //        var_dump($insertData);
        $id = $mysql->insert("emotion", $insertData);
        echo "id=" . $id . "  ";
    }
    $mysql->closeCon();
    echo json_encode("解析成功");
    exit;
} else {
    echo json_encode("没有数据");
}
开发者ID:Hank-wood,项目名称:meizizhi,代码行数:30,代码来源:emo.php

示例7: updateShowIndex

 public static function updateShowIndex($pageid, $showIndex)
 {
     $nt = time() * 1000;
     $sql = "update page set  showindex=" . $showIndex . ",udate=" . $nt . " where pageid=" . $pageid;
     $mysql = new MySQL();
     $mysql->execute($sql);
     $mysql->closeCon();
     return true;
 }
开发者ID:Hank-wood,项目名称:meizizhi,代码行数:9,代码来源:ReviewService.php


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