本文整理汇总了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;
}
示例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;
}
示例3: insertDiscuss
public static function insertDiscuss($disObj)
{
$mysql = new MySQL();
$res = $mysql->insert("page_discs", $disObj);
$mysql->closeCon();
PageService::updateDisNum($disObj['pageid']);
return $res;
}
示例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;
}
示例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;
}
示例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("没有数据");
}
示例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;
}