本文整理汇总了PHP中pdo_delete函数的典型用法代码示例。如果您正苦于以下问题:PHP pdo_delete函数的具体用法?PHP pdo_delete怎么用?PHP pdo_delete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pdo_delete函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ruleDeleted
public function ruleDeleted($rid = 0)
{
pdo_delete('vote_reply', array('rid' => $rid));
pdo_delete('vote_fans', array('rid' => $rid));
pdo_delete('vote_option', array('rid' => $rid));
return true;
}
示例2: ruleDeleted
public function ruleDeleted($rid)
{
//删除规则时调用,这里 $rid 为对应的规则
pdo_delete('eso_runman_reply', array('rid' => $rid));
pdo_delete('eso_runman_users', array('rid' => $rid));
pdo_delete('eso_runman_submit', array('rid' => $rid));
}
示例3: doWebAwardlist
public function doWebAwardlist()
{
global $_GPC, $_W;
$id = intval($_GPC['id']);
if (checksubmit('delete')) {
pdo_delete('zzz_user', " id IN ('" . implode("','", $_GPC['select']) . "')");
message('删除成功!', $this->createWebUrl('awardlist', array('id' => $id, 'page' => $_GPC['page'])));
}
if (!empty($_GPC['wid'])) {
$wid = intval($_GPC['wid']);
pdo_update('zzz_user', array('status' => intval($_GPC['status'])), array('id' => $wid));
message('标识领奖成功!', $this->createWebUrl('awardlist', array('id' => $id, 'page' => $_GPC['page'])));
}
$pindex = max(1, intval($_GPC['page']));
$psize = 15;
$where = '';
$condition = array('mobile' => " AND `b`.`mobile` LIKE '%" . $_GPC['profilevalue'] . "%'", 'realname' => " AND `b`.`realname` LIKE '%" . $_GPC['profilevalue'] . "%'", 'nickname' => " AND `b`.`nickname` LIKE '%" . $_GPC['profilevalue'] . "%'");
if (!empty($_GPC['profile'])) {
$where .= $condition[$_GPC['profile']];
}
$sql = 'SELECT `a`.`id`, `a`.`friendcount`, `a`.`points`, `a`.`createtime`, `a`.`sharevalue`, `b`.`realname`, `b`.`nickname`,
`b`.`mobile` FROM ' . tablename('zzz_user') . ' AS `a` LEFT JOIN ' . tablename('mc_mapping_fans') . ' AS `f` ON
`f`.`fanid` = `a`.`fanid` LEFT JOIN ' . tablename('mc_members') . " AS `b` ON `b`.`uid` = `f`.`uid` WHERE `a`.`rid` = :rid\n {$where} ORDER BY `a`.`points` DESC ";
$params = array(':rid' => $id);
if (empty($_GPC['export'])) {
$sql .= ' LIMIT ' . ($pindex - 1) * $psize . ',' . $psize;
} else {
$list = pdo_fetchall($sql, $params);
$tableHeader = array('realname' => '姓名', 'nickname' => '昵称', 'mobile' => '手机', 'points' => '分数');
$tableLength = count($tableHeader) + 1;
/* 输入到CSV文件 */
$html = "";
/* 输出表头 */
foreach ($tableHeader as $header) {
$html .= $header . "\t ,";
}
$html .= "创建时间\t, \n";
/* 输出内容 */
foreach ($list as $value) {
foreach ($tableHeader as $key => $header) {
$html .= $value[$key] . "\t ,";
}
$html .= date('Y-m-d H:i:s', $value['createtime']) . "\t ,";
$html .= "\n";
}
/* 输出CSV文件 */
header("Content-type:text/csv");
header("Content-Disposition:attachment; filename=全部数据.csv");
echo $html;
exit;
}
$list = pdo_fetchall($sql, $params);
if (!empty($list)) {
$sql = 'SELECT COUNT(*) FROM ' . tablename('zzz_user') . ' AS `a` LEFT JOIN ' . tablename('mc_mapping_fans') . ' AS `f` ON `f`.`fanid` =
`a`.`fanid` LEFT JOIN ' . tablename('mc_members') . ' AS `b` ON `b`.`uid` = `f`.`uid` WHERE `a`.`rid` = :rid' . $where;
$total = pdo_fetchcolumn($sql, $params);
$pager = pagination($total, $pindex, $psize);
}
include $this->template('awardlist');
}
示例4: doWebList
public function doWebList($ischeck = 1)
{
global $_GPC, $_W;
// AJAX
if ($_W['isajax']) {
$op = $_GPC['op'];
$id = intval($_GPC['id']);
$result = array('state' => -1, 'message' => '');
if ($op == 'delete') {
$item = $this->item_fetch($id);
if ($item['id']) {
load()->func('file');
file_delete($item['photo']);
pdo_delete('qiyue_canvas', array('id' => $item['id']));
$result['state'] = 0;
}
} elseif ($op == 'check') {
if ($this->item_check($id)) {
$result['state'] = 0;
}
}
message($result, '', 'ajax');
}
$title = '图片管理';
$result = $this->all_list(array('ischeck' => $ischeck));
include $this->template('manage');
}
示例5: doMobiledelcomment
public function doMobiledelcomment()
{
global $_W, $_GPC;
$cid = $_GPC['cid'];
//$comment=$_GPC['cont'];
//将ajax写入comment
$uniacid = $_W['uniacid'];
// $openid=$_W['openid'];
// $ulist=$this->auth($uniacid,$openid);
//var_dump($ulist);
// $data=array(
// 'uniacid'=>$uniacid,
// 'tid'=>$tid,
// 'comment'=>$comment,
// 'nickname'=>$ulist['nickname'],
// 'cuid'=>$ulist['uid'],
// 'createtime'=>TIMESTAMP
// );
// pdo_insert('enjoy_circle_comment',$data);
$data['tid'] = pdo_fetchcolumn("select tid from " . tablename('enjoy_circle_comment') . " where cid=" . $cid . "");
//删除评论
$res = pdo_delete('enjoy_circle_comment', array('uniacid' => $uniacid, 'cid' => $cid));
if ($res > 0) {
echo json_encode($data);
}
}
示例6: doWebAwardlist
public function doWebAwardlist()
{
global $_GPC, $_W;
checklogin();
//$from_user = $_W['fans']['from_user'];
$id = $_GPC['id'];
if (checksubmit('delete')) {
pdo_delete('mgamblemoon_user', " id IN ('" . implode("','", $_GPC['select']) . "')");
message('删除成功!', $this->createWebUrl('awardlist', array('id' => $id, 'page' => $_GPC['page'])));
}
if (!empty($_GPC['wid'])) {
$wid = intval($_GPC['wid']);
pdo_update('mgamblemoon_user', array('status' => intval($_GPC['status'])), array('id' => $wid));
message('标识领奖成功!', $this->createWebUrl('awardlist', array('id' => $id, 'page' => $_GPC['page'])));
}
$pindex = max(1, intval($_GPC['page']));
$psize = 50;
$where = '';
$condition = array('mobile' => " AND b.mobile ='{$_GPC['profilevalue']}'", 'realname' => " AND b.realname ='{$_GPC['profilevalue']}'");
if (!empty($_GPC['profile'])) {
$where .= $condition[$_GPC['profile']];
}
$sql = "SELECT a.id, a.award,a.createtime,a.num,a.status, b.nickname, b.mobile FROM " . tablename('mgamblemoon_user') . " AS a\n\t\t\t\tLEFT JOIN " . tablename('fans') . " AS b ON a.from_user = b.from_user WHERE a.rid = {$id} {$where} ORDER BY a.huodeid ASC LIMIT " . ($pindex - 1) * $psize . ",{$psize}";
$list = pdo_fetchall($sql);
if (!empty($list)) {
$total = pdo_fetchcolumn("SELECT COUNT(*) FROM " . tablename('mgamblemoon_user') . " AS a\n\t\t\t\tLEFT JOIN " . tablename('fans') . " AS b ON a.from_user = b.from_user WHERE a.rid = '{$id}' {$where}");
$pager = pagination($total, $pindex, $psize);
}
include $this->template('awardlist');
}
示例7: doWebCredit
public function doWebCredit()
{
// 1. display reservation
// 2. add credit
// 3. delete credit
// 4. update credit
global $_W;
global $_GPC;
// 获取query string中的参数
$operation = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
if ($operation == 'delete') {
//删除兑换请求
$id = intval($_GPC['id']);
$row = pdo_fetch("SELECT id FROM " . tablename('credit_request') . " WHERE id = :id", array(':id' => $id));
if (empty($row)) {
message('抱歉,编号为' . $id . '的兑换请求不存在或是已经被删除!');
}
pdo_delete('credit_request', array('id' => $id));
message('删除成功!', referer(), 'success');
} else {
if ($operation == 'display') {
$condition = '';
$sql = "SELECT * FROM " . tablename('award_list') . " as t1," . tablename('credit_request') . "as t2 WHERE t1.award_id=t2.award_id AND t1.weid = '{$_W['weid']}' ORDER BY t2.createtime DESC";
$list = pdo_fetchall($sql);
$ar = pdo_fetchall($sql, array(), 'from_user');
$fans = fans_search(array_keys($ar), array('realname', 'mobile', 'credit1', 'residedist'));
}
}
include $this->template('credit_request');
}
示例8: doWebAwardlist
public function doWebAwardlist()
{
global $_GPC, $_W;
$id = intval($_GPC['id']);
if (checksubmit('delete')) {
pdo_delete('zzz_user', " id IN ('" . implode("','", $_GPC['select']) . "')");
message('删除成功!', $this->createWebUrl('awardlist', array('id' => $id, 'page' => $_GPC['page'])));
}
if (!empty($_GPC['wid'])) {
$wid = intval($_GPC['wid']);
pdo_update('zzz_user', array('status' => intval($_GPC['status'])), array('id' => $wid));
message('标识领奖成功!', $this->createWebUrl('awardlist', array('id' => $id, 'page' => $_GPC['page'])));
}
$pindex = max(1, intval($_GPC['page']));
$psize = 50;
$where = '';
$condition = array('mobile' => " AND `b`.`mobile` LIKE '%" . $_GPC['profilevalue'] . "%'", 'realname' => " AND `b`.`realname` LIKE '%" . $_GPC['profilevalue'] . "%'", 'nickname' => " AND `b`.`nickname` LIKE '%" . $_GPC['profilevalue'] . "%'");
if (!empty($_GPC['profile'])) {
$where .= $condition[$_GPC['profile']];
}
$sql = 'SELECT `a`.`id`, `a`.`friendcount`, `a`.`points`, `a`.`createtime`, `b`.`realname`, `b`.`nickname`, `b`.`mobile` FROM ' . tablename('zzz_user') . ' AS `a` LEFT JOIN ' . tablename('mc_mapping_fans') . ' AS `f` ON `f`.`fanid` = `a`.`fanid` LEFT
JOIN ' . tablename('mc_members') . " AS `b` ON `b`.`uid` = `f`.`uid` WHERE `a`.`rid` = :rid {$where} ORDER BY `a`.`points`\n DESC LIMIT " . ($pindex - 1) * $psize . ',' . $psize;
$params = array(':rid' => $id);
$list = pdo_fetchall($sql, $params);
if (!empty($list)) {
$sql = 'SELECT COUNT(*) FROM ' . tablename('zzz_user') . ' AS `a` LEFT JOIN ' . tablename('mc_mapping_fans') . ' AS `f` ON `f`.`fanid` =
`a`.`fanid` LEFT JOIN ' . tablename('mc_members') . ' AS `b` ON `b`.`uid` = `f`.`uid` WHERE `a`.`rid` = :rid' . $where;
$total = pdo_fetchcolumn($sql, $params);
$pager = pagination($total, $pindex, $psize);
}
include $this->template('awardlist');
}
示例9: doWebList
public function doWebList()
{
global $_GPC, $_W;
checklogin();
$weid = $_W['account']['weid'];
//当前公众号ID
$id = intval($_GPC['id']);
$condition = '';
if (!empty($_GPC['name'])) {
$condition .= " AND ( grabername LIKE '%{$_GPC['realname']}%' OR fitername LIKE '%{$_GPC['realname']}%' )";
}
if (!empty($_GPC['mobile'])) {
$condition .= " AND ( grabermobile = '{$_GPC['mobile']}' OR fitermobile = '{$_GPC['mobile']}' )";
}
if (checksubmit('delete')) {
pdo_delete('grabseat_record', " id IN ('" . implode("','", $_GPC['select']) . "')");
message('删除成功!', $this->createWebUrl('list', array('id' => $id, 'page' => $_GPC['page'])));
}
if (!empty($_GPC['wid'])) {
$wid = intval($_GPC['wid']);
pdo_update('grabseat_record', array('status' => intval($_GPC['status'])), array('id' => $wid));
message('标识领奖成功!', $this->createWebUrl('list', array('id' => $id, 'page' => $_GPC['page'])));
}
$pindex = max(1, intval($_GPC['page']));
$psize = 25;
$list = pdo_fetchall("SELECT * FROM " . tablename('grabseat_record') . " WHERE weid = '{$_W['weid']}' {$condition} ORDER BY id DESC LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
$listtotal = pdo_fetchall("SELECT * FROM " . tablename('grabseat_record') . " WHERE weid = '{$_W['weid']}' {$condition} ");
$total = count($listtotal);
$pager = pagination($total, $pindex, $psize);
include $this->template('list');
}
示例10: receive
public function receive()
{
global $_W, $_GPC;
load()->func('communication');
$type = $this->message['type'];
$uniacid = $GLOBALS['_W']['uniacid'];
$acid = $GLOBALS['_W']['acid'];
//$uniacid = $_W['acid'];
$rid = intval($this->params['rule']);
$rid = $this->rule;
$openid = $this->message['fromusername'];
$cfg = $this->module['config'];
//file_put_contents(IA_ROOT.'/receive.txt', iserializer($cfg));
if ($this->message['event'] == 'unsubscribe' && $cfg['isopenjsps']) {
$record = array('updatetime' => TIMESTAMP, 'follow' => '0', 'followtime' => TIMESTAMP);
pdo_update('mc_mapping_fans', $record, array('openid' => $openid, 'acid' => $acid, 'uniacid' => $uniacid));
$fmvotelog = pdo_fetchall("SELECT * FROM " . tablename('fm_photosvote_votelog') . " WHERE from_user = :from_user and uniacid = :uniacid LIMIT 1", array(':from_user' => $openid, ':uniacid' => $uniacid));
foreach ($fmvotelog as $log) {
$fmprovevote = pdo_fetch("SELECT * FROM " . tablename('fm_photosvote_provevote') . " WHERE from_user = :from_user and uniacid = :uniacid LIMIT 1", array(':from_user' => $log['tfrom_user'], ':uniacid' => $uniacid));
pdo_update('fm_photosvote_provevote', array('lasttime' => TIMESTAMP, 'photosnum' => $fmprovevote['photosnum'] - 1, 'hits' => $fmprovevote['hits'] - 1), array('from_user' => $log['tfrom_user'], 'uniacid' => $uniacid));
}
pdo_delete('fm_photosvote_votelog', array('from_user' => $openid));
pdo_delete('fm_photosvote_bbsreply', array('from_user' => $openid));
}
}
示例11: ruleDeleted
public function ruleDeleted($rid)
{
$form = DBUtil::findUnique(DBUtil::$TABLE_ORDER_FORM, array(":rid" => $rid));
pdo_delete(DBUtil::$TABLE_ORDER_ITEM, array("fid" => $form['id']));
pdo_delete(DBUtil::$TABLE_ORDER_ORDER, array("fid" => $form['id']));
pdo_delete(DBUtil::$TABLE_ORDER_FORM, array('id' => $form['id']));
}
示例12: dolist
public function dolist()
{
global $_GPC, $_W;
checklogin();
$weid = intval($_W['weid']);
if (checksubmit('verify') && !empty($_GPC['select'])) {
pdo_update('message_list', array('isshow' => 1, 'create_time' => TIMESTAMP), " id IN ('" . implode("','", $_GPC['select']) . "')");
message('审核成功!', create_url('site/module', array('do' => 'list', 'name' => 'message', 'weid' => $weid, 'page' => $_GPC['page'])));
}
if (checksubmit('delete') && !empty($_GPC['select'])) {
pdo_delete('message_list', " id IN ('" . implode("','", $_GPC['select']) . "')");
message('删除成功!', create_url('site/module', array('do' => 'list', 'name' => 'message', 'weid' => $weid, 'page' => $_GPC['page'])));
}
$isshow = isset($_GPC['isshow']) ? intval($_GPC['isshow']) : 0;
$pindex = max(1, intval($_GPC['page']));
$psize = 20;
$message = pdo_fetch("SELECT id, isshow, weid FROM " . tablename('message_reply') . " WHERE weid = '{$weid}' LIMIT 1");
$list = pdo_fetchall("SELECT * FROM " . tablename('message_list') . " WHERE weid = '{$message['weid']}' AND isshow = '{$isshow}' ORDER BY create_time DESC LIMIT " . ($pindex - 1) * $psize . ",{$psize}");
if (!empty($list)) {
$total = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename('message_list') . " WHERE weid = '{$message['weid']}' AND isshow = '{$isshow}'");
$pager = pagination($total, $pindex, $psize);
foreach ($list as &$row) {
$row['content'] = emotion($row['content']);
$userids[] = $row['from_user'];
}
unset($row);
}
include $this->template('list');
}
示例13: doMobiledelcomment
public function doMobiledelcomment()
{
global $_W, $_GPC;
$cid = $_GPC['cid'];
$uniacid = $_W['uniacid'];
pdo_delete('enjoy_circle_comment', array('uniacid' => $uniacid, 'cid' => $cid));
}
示例14: receive
public function receive()
{
global $_W;
$wedata = pdo_fetch("SELECT * FROM " . tablename('members_status') . " WHERE uid = '{$_W['account']['uid']}' LIMIT 1");
if ($wedata) {
if (TIMESTAMP > $wedata['endtime']) {
$data = array();
$data['stattime'] = TIMESTAMP;
$data['status'] = 1;
$data['endtime'] = TIMESTAMP + 3600 * 24 * 365;
pdo_update('members_status', $data, array('id' => $wedata['id']));
$nMember = array();
$nMember['uid'] = $_W['account']['uid'];
$nMember['groupid'] = 1;
member_update($nMember);
pdo_delete('members_permission', array('uid' => $_W['account']['uid']));
}
} else {
$data = array();
$data['endtime'] = TIMESTAMP + 86400 * 3;
$data['stattime'] = TIMESTAMP;
$data['uid'] = $_W['account']['uid'];
pdo_insert('members_status', $data);
}
}
示例15: doWebAddInfo
public function doWebAddInfo()
{
global $_W, $_GPC;
load()->func('tpl');
$infoid = intval($_GPC['infoid']);
if ($infoid) {
$info = pdo_fetch("SELECT * FROM " . tablename('water_query_info') . " WHERE id= " . $infoid);
}
if ($_GPC['op'] == 'delete') {
$infoid = intval($_GPC['infoid']);
$info = pdo_fetch("SELECT id FROM " . tablename('water_query_info') . " WHERE id = " . $infoid);
if (empty($info)) {
message('抱歉,信息不存在或是已经被删除!');
}
pdo_delete('water_query_info', array('id' => $infoid));
message('删除成功!', referer(), 'success');
}
if (checksubmit()) {
$data = array('keyword' => $_GPC['keyword'], 'info' => htmlspecialchars_decode($_GPC['info']), 'infophoto' => $_GPC['infophoto']);
if (!empty($infoid)) {
pdo_update('water_query_info', $data, array('id' => $infoid));
} else {
$data['uniacid'] = $_W['uniacid'];
pdo_insert('water_query_info', $data);
$infoid = pdo_insertid();
}
message('更新成功!', referer(), 'success');
}
include $this->template('addinfo');
}