本文整理汇总了PHP中mysqld_delete函数的典型用法代码示例。如果您正苦于以下问题:PHP mysqld_delete函数的具体用法?PHP mysqld_delete怎么用?PHP mysqld_delete使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mysqld_delete函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: do_clear
public function do_clear()
{
mysqld_delete('bigwheel_award', array());
mysqld_delete('bigwheel_fans', array());
mysqld_delete('bigwheel_reply', array());
message('活动重置成功!', "refresh", 'success');
}
示例2: mysqld_delete
<?php
if ($_CMS['addons_bj_hx']) {
if (!empty($_GP['isverify'])) {
mysqld_delete('bj_hx_verify_goods', array('goodsid' => $id));
if (!empty($_GP['verifyshop_cb'])) {
foreach ($_GP['verifyshop_cb'] as $verifyshop_cb) {
mysqld_insert('bj_hx_verify_goods', array('goodsid' => $id, 'verifyid' => $verifyshop_cb, 'createtime' => time()));
}
}
} else {
mysqld_delete('bj_hx_verify_goods', array('goodsid' => $id));
}
}
示例3: mysqld_delete
<?php
$operation = !empty($_GP['op']) ? $_GP['op'] : 'display';
if ($operation == 'delete') {
mysqld_delete('addon10_scene_subscribe', array("id" => intval($_GP['id'])));
message("删除成功!", "refresh", "success");
}
$subscribe_list = mysqld_selectall("SELECT subscribe.*,sl.title FROM " . table('addon10_scene_subscribe') . " subscribe left join " . table('addon10_scene_list') . " sl on sl.id=subscribe.list_id ");
include addons_page('subscribe');
示例4: defined
<?php
defined('SYSTEM_IN') or exit('Access Denied');
hasrule('weixin', 'weixin');
$settings = globaSetting();
$payment = mysqld_select("SELECT * FROM " . table('payment') . " WHERE code = :code", array(':code' => 'weixin'));
if (!empty($payment['configs'])) {
$paymentconfig = unserialize($payment['configs']);
}
$thirdlogin = mysqld_select("SELECT * FROM " . table('thirdlogin') . " WHERE code = :code", array(':code' => 'weixin'));
if (checksubmit()) {
$cfg = array('weixinname' => $_GP['weixinname'], 'weixintoken' => $_GP['weixintoken'], 'EncodingAESKey' => $_GP['EncodingAESKey'], 'weixin_appId' => $_GP['weixin_appId'], 'weixin_appSecret' => $_GP['weixin_appSecret'], 'weixin_autoreg' => $_GP['weixin_autoreg']);
refreshSetting($cfg);
mysqld_delete('config', array('name' => 'weixin_access_token'));
$settings = globaSetting();
$thirdlogin = mysqld_select("SELECT * FROM " . table('thirdlogin') . " WHERE code = :code", array(':code' => 'weixin'));
require WEB_ROOT . '/system/modules/plugin/thirdlogin/weixin/lang.php';
if (empty($thirdlogin['id'])) {
$data = array('code' => 'weixin', 'enabled' => intval($_GP['thirdlogin_weixin']), 'name' => $_LANG['thirdlogin_weixin_name']);
mysqld_insert('thirdlogin', $data);
} else {
$data = array('enabled' => intval($_GP['thirdlogin_weixin']), 'name' => $_LANG['thirdlogin_weixin_name']);
mysqld_update('thirdlogin', $data, array('code' => 'weixin'));
}
if (empty($settings['weixintoken']) && !empty($_GP['weixintoken'])) {
header("location:" . create_url('site', array('name' => 'weixin', 'do' => 'setting')));
} else {
message('保存成功', 'refresh', 'success');
}
}
if (empty($settings['weixintoken'])) {
示例5: array
if (empty($row)) {
continue;
}
$hsdata[$index] = array('attachment' => $_GP['attachment-new'][$index]);
}
$cur_index = $index + 1;
}
if (!empty($_GP['attachment'])) {
foreach ($_GP['attachment'] as $index => $row) {
if (empty($row)) {
continue;
}
$hsdata[$cur_index + $index] = array('attachment' => $_GP['attachment'][$index]);
}
}
mysqld_delete('shop_goods_piclist', array('goodid' => $id));
foreach ($hsdata as $row) {
$data = array('goodid' => $id, 'picurl' => $row['attachment']);
mysqld_insert('shop_goods_piclist', $data);
}
//处理商品规格
$files = $_FILES;
$spec_ids = $_POST['spec_id'];
$spec_titles = $_POST['spec_title'];
$specids = array();
$len = count($spec_ids);
$specids = array();
$spec_items = array();
for ($k = 0; $k < $len; $k++) {
$spec_id = "";
$get_spec_id = $spec_ids[$k];
示例6: mysqld_delete
<?php
$operation = !empty($_GP['op']) ? $_GP['op'] : 'display';
if ($operation == 'delete') {
mysqld_delete('addon8_article', array("id" => intval($_GP['id'])));
message("删除成功!", "refresh", "success");
}
if ($operation == 'post') {
$category = mysqld_selectall("SELECT * FROM " . table('addon8_article_category') . " where deleted=0 ORDER BY parentid ASC, displayorder DESC", array(), 'id');
if (!empty($category)) {
$children = '';
foreach ($category as $cid => $cate) {
if (!empty($cate['parentid'])) {
$children[$cate['parentid']][$cate['id']] = array($cate['id'], $cate['name']);
}
}
}
$article = mysqld_select("SELECT * FROM " . table('addon8_article') . " where id='" . intval($_GP['id']) . "' ");
if (checksubmit('submit')) {
if (empty($article['id'])) {
$data = array('createtime' => time(), 'pcate' => intval($_GP['pcate']), 'ccate' => intval($_GP['ccate']), 'iscommend' => intval($_GP['iscommend']), 'ishot' => intval($_GP['ishot']), 'mobileTheme' => intval($_GP['mobileTheme']), 'title' => $_GP['title'], 'readcount' => intval($_GP['readcount']), 'description' => $_GP['description'], 'content' => htmlspecialchars_decode($_GP['content']), 'displayorder' => intval($_GP['displayorder']));
if (!empty($_GP['thumb_del'])) {
$data['thumb'] = '';
}
if (!empty($_FILES['thumb']['tmp_name'])) {
file_delete($_GP['thumb_old']);
$upload = file_upload($_FILES['thumb']);
if (is_error($upload)) {
message($upload['message'], '', 'error');
}
$data['thumb'] = $upload['path'];
示例7: do_user
public function do_user()
{
global $_GP;
$operation = !empty($_GP['op']) ? $_GP['op'] : 'listuser';
if ($operation == 'listuser') {
$list = mysqld_selectall("select * from " . table('user'));
include page('listuser');
}
if ($operation == 'rule') {
$allrule = mysqld_selectall('SELECT * FROM ' . table('rule'));
$id = $_GP['id'];
$account = mysqld_select('SELECT * FROM ' . table('user') . " WHERE id=:id", array(':id' => $id));
$username = $account['username'];
$userRule = mysqld_selectall('SELECT * FROM ' . table('user_rule') . " WHERE uid=:uid", array(':uid' => $id));
foreach ($allrule as $key => $item) {
foreach ($userRule as $rule) {
if ($item['modname'] == $rule['modname'] && $item['moddo'] == $rule['moddo']) {
$allrule[$key]['check'] = true;
}
}
}
if (checksubmit('submit')) {
if (empty($id)) {
message('操作异常', refresh(), 'error');
}
if (!empty($account['id'])) {
mysqld_delete('user_rule', array('uid' => $account['id']));
foreach ($allrule as $item) {
if (!empty($_GP[$item['modname'] . '-' . $item['moddo']])) {
$data = array('uid' => $account['id'], 'modname' => $item['modname'], 'moddo' => $item['moddo']);
mysqld_insert('user_rule', $data);
}
}
}
message('权限修改成功!', refresh(), 'succes');
}
include page('rule');
}
if ($operation == 'deleteuser') {
mysqld_delete('user', array('id' => $_GP['id']));
mysqld_delete('user_rule', array('uid' => $_GP['id']));
message('删除成功', refresh(), 'success');
}
if ($operation == 'changepwduser') {
$account = mysqld_select('SELECT * FROM ' . table('user') . " WHERE id=:id", array(':id' => $_GP['id']));
$username = $account['username'];
$id = $account['id'];
if (checksubmit('submit')) {
if (empty($_GP['newpassword'])) {
message('密码不能为空', refresh(), 'error');
}
if (!empty($account['id'])) {
if ($_GP['newpassword'] != $_GP['confirmpassword']) {
message('两次密码不一致!', refresh(), 'error');
}
$data = array('password' => md5($_GP['newpassword']));
mysqld_update('user', $data, array('id' => $account['id']));
message('密码修改成功!', create_url('site', array('name' => 'user', 'do' => 'listuser')), 'succes');
} else {
message($_GP['username'] . '用户名已存在', refresh(), 'error');
}
}
include page('changepwd');
}
if ($operation == 'adduser') {
$allrule = mysqld_selectall('SELECT * FROM ' . table('rule'));
if (checksubmit('submit')) {
if (empty($_GP['username']) || empty($_GP['newpassword'])) {
message('用户名或密码不能为空', refresh(), 'success');
}
$account = mysqld_select('SELECT * FROM ' . table('user') . " WHERE username=:username", array(':username' => $_GP['username']));
if (empty($account['id'])) {
if ($_GP['newpassword'] != $_GP['confirmpassword']) {
message('两次密码不一致!', refresh(), 'error');
}
$data = array('username' => $_GP['username'], 'password' => md5($_GP['newpassword']));
mysqld_insert('user', $data);
$account = mysqld_select('SELECT * FROM ' . table('user') . " WHERE username=:username", array(':username' => $_GP['username']));
if (!empty($account['id'])) {
mysqld_delete('user_rule', array('uid' => $account['id']));
foreach ($allrule as $item) {
if (!empty($_GP[$item['modname'] . '-' . $item['moddo']])) {
$data = array('uid' => $account['id'], 'modname' => $item['modname'], 'moddo' => $item['moddo']);
mysqld_insert('user_rule', $data);
}
}
}
message('新增用户成功!', web_url('user'), 'succes');
} else {
message($_GP['username'] . '用户名已存在', refresh(), 'error');
}
}
include page('adduser');
}
}
示例8: mysqld_select
<?php
$setting = mysqld_select("SELECT * FROM " . table('addon7_config'));
if (checksubmit("submit")) {
$cfg = array('title' => $_GP['title']);
mysqld_delete('addon7_config', array());
mysqld_insert('addon7_config', $cfg);
message('保存成功', 'refresh', 'success');
}
include addons_page('setting');
示例9: elseif
} elseif ($operation == 'post') {
$id = intval($_GP['id']);
if (checksubmit('submit')) {
$data = array('link' => $_GP['link'], 'enabled' => intval($_GP['enabled']), 'displayorder' => intval($_GP['displayorder']));
if (!empty($_FILES['thumb']['tmp_name'])) {
$upload = file_upload($_FILES['thumb']);
if (is_error($upload)) {
message($upload['message'], '', 'error');
}
$data['thumb'] = $upload['path'];
}
if (!empty($id)) {
mysqld_update('shop_adv', $data, array('id' => $id));
} else {
mysqld_insert('shop_adv', $data);
}
message('更新幻灯片成功!', web_url('adv', array('op' => 'display')), 'success');
}
$adv = mysqld_select("select * from " . table('shop_adv') . " where id=:id limit 1", array(":id" => $id));
include page('adv');
} elseif ($operation == 'delete') {
$id = intval($_GP['id']);
$adv = mysqld_select("SELECT id FROM " . table('shop_adv') . " WHERE id = '{$id}' ");
if (empty($adv)) {
message('抱歉,幻灯片不存在或是已经被删除!', web_url('adv', array('op' => 'display')), 'error');
}
mysqld_delete('shop_adv', array('id' => $id));
message('幻灯片删除成功!', web_url('adv', array('op' => 'display')), 'success');
} else {
message('请求方式不存在');
}
示例10: mysqld_selectall
<?php
$operation = !empty($_GP['op']) ? $_GP['op'] : 'display';
$list = mysqld_selectall("SELECT * FROM " . table('xc_zjp_winner') . " where award <> '' ORDER BY createtime DESC");
foreach ($list as $id => $item) {
$list[$id]['mobile'] = mysqld_selectcolumn("select mobile\tfrom" . table('member') . " where istemplate=0 and openid=:openid ", array(':openid' => $item['open_id']));
}
if ($operation == 'post') {
$id = intval($_GP['id']);
mysqld_update('xc_zjp_winner', array('status' => 2), array('id' => $id));
message('兑现成功!', web_url('awardlist'), 'success');
}
if ($operation == 'delete') {
$id = intval($_GP['id']);
mysqld_delete('xc_zjp_winner', array('id' => $id));
message('删除成功!', web_url('awardlist'), 'success');
}
include addons_page('awardlist');
示例11: max
<?php
$operation = !empty($_GP['op']) ? $_GP['op'] : 'display';
if ($operation == 'display') {
$pindex = max(1, intval($_GP['page']));
$psize = 20;
$condition = '';
$id = intval($_GP['id']);
$list = mysqld_selectall("SELECT comment.*,member.realname,member.mobile,shop_goods.title FROM " . table('shop_goods_comment') . " comment left join " . table('member') . " member on comment.openid=member.openid left join " . table('shop_goods') . " shop_goods on shop_goods.id=comment.goodsid ORDER BY comment.createtime DESC LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
$total = mysqld_selectcolumn('SELECT COUNT(*) FROM ' . table('shop_goods_comment'));
$pager = pagination($total, $pindex, $psize);
include page('goods_comment');
} elseif ($operation == 'delete') {
$id = intval($_GP['id']);
$row = mysqld_select("SELECT * FROM " . table('shop_goods_comment') . " WHERE id = :id", array(':id' => $id));
if (empty($row)) {
message('抱歉,评论不存在或是已经被删除!');
}
//修改成不直接删除,而设置deleted=1
mysqld_delete("shop_goods_comment", array('id' => $id));
message('删除成功!', 'refresh', 'success');
}
示例12: mysqld_select
$payment = mysqld_select("select * from " . table("payment") . " where enabled=1 and code=:payment", array(':payment' => $_GP['payment']));
if (empty($payment['id'])) {
message("没有获取到付款方式");
}
$paytype = $this->getPaytypebycode($payment['code']);
$data = array('openid' => $openid, 'ordersn' => $ordersns, 'price' => $goodsprice + $dispatchprice, 'dispatchprice' => $dispatchprice, 'goodsprice' => $goodsprice, 'credit' => $goodscredit, 'status' => 0, 'paytype' => $paytype, 'sendtype' => intval($dispatchitem['sendtype']), 'dispatchexpress' => $dispatchitem['express'], 'dispatch' => $dispatchid, 'paytypecode' => $payment['code'], 'paytypename' => $payment['name'], 'remark' => $_GP['remark'], 'address_mobile' => $address['mobile'], 'address_realname' => $address['realname'], 'address_province' => $address['province'], 'address_city' => $address['city'], 'address_area' => $address['area'], 'address_address' => $address['address'], 'createtime' => time());
mysqld_insert('shop_order', $data);
$orderid = mysqld_insertid();
//插入订单商品
foreach ($allgoods as $row) {
if (empty($row)) {
continue;
}
$d = array('goodsid' => $row['id'], 'orderid' => $orderid, 'total' => $row['total'], 'price' => $row['marketprice'], 'createtime' => time(), 'optionid' => $row['optionid']);
$o = mysqld_select("select title from " . table('shop_goods_option') . " where id=:id limit 1", array(":id" => $row['optionid']));
if (!empty($o)) {
$d['optionname'] = $o['title'];
}
//获取商品id
$ccate = $row['ccate'];
mysqld_insert('shop_order_goods', $d);
}
//清空购物车
if (!$direct) {
mysqld_delete("shop_cart", array("session_id" => $openid));
}
$this->setOrderStock($orderid);
clearloginfrom();
header("Location:" . mobile_url('pay', array('orderid' => $orderid, 'topay' => '1')));
}
include themePage('confirm');
示例13: mysqld_selectcolumn
<?php
$requestcount = mysqld_selectcolumn("select count(id) FROM " . table('addon7_request') . " where award_id=:id", array(":id" => intval($_GP['id'])));
if (empty($requestcount)) {
mysqld_delete('addon7_award', array("id" => intval($_GP['id'])));
} else {
mysqld_update('addon7_award', array("deleted" => 1), array("id" => intval($_GP['id'])));
}
message('删除成功!', 'refresh', 'success');
示例14: array
$children[$cate['parentid']][$cate['id']] = array($cate['id'], $cate['name']);
}
}
}
$condition = '';
if (!empty($_GP['cate_2'])) {
$cid = intval($_GP['cate_2']);
$condition .= " AND ccate = '{$cid}'";
} elseif (!empty($_GP['cate_1'])) {
$cid = intval($_GP['cate_1']);
$condition .= " AND pcate = '{$cid}'";
}
$bonus_good_list = mysqld_selectall("SELECT bonus_good.*,shop_goods.title FROM " . table('bonus_good') . " bonus_good left join " . table('shop_goods') . " shop_goods on shop_goods.id=bonus_good.good_id WHERE bonus_good.bonus_type_id=:bonus_type_id", array(":bonus_type_id" => intval($_GP['id'])));
$goodslist = mysqld_selectall("SELECT * FROM " . table('shop_goods') . " WHERE deleted=0 {$condition} and status=1 and id not in (SELECT good_id FROM " . table('bonus_good') . " WHERE bonus_type_id=:bonus_type_id)", array(":bonus_type_id" => intval($_GP['id'])));
if (checksubmit('send_goods')) {
mysqld_delete('bonus_good', array('bonus_type_id' => intval($_GP['id'])));
foreach ($_GP['good_add'] as &$goodid) {
$bonus_good = mysqld_select("SELECT * FROM " . table('bonus_good') . " WHERE bonus_type_id=:bonus_type_id and good_id=:good_id", array(":bonus_type_id" => intval($_GP['id']), ":good_id" => intval($goodid)));
$goods = mysqld_select("SELECT * FROM " . table('shop_goods') . " WHERE deleted=0 and id=:goodid and status=1", array(":goodid" => $goodid));
if (empty($bonus_good['id']) && !empty($goods['id'])) {
mysqld_insert('bonus_good', array('bonus_type_id' => intval($_GP['id']), 'good_id' => $goodid));
}
}
message("设置成功!", "refresh", "success");
}
include page('sendgoodbonus');
}
if ($bonus['send_type'] == 3) {
if (empty($_GP['id'])) {
message("无法获取到优惠券信息");
}
示例15: mysqld_selectall
<?php
$operation = !empty($_GP['op']) ? $_GP['op'] : 'display';
if ($operation == 'display') {
$pormotions = mysqld_selectall("SELECT * FROM " . table('shop_pormotions'));
include page('promotion_list');
exit;
}
if ($operation == 'delete') {
mysqld_delete('shop_pormotions', array('id' => intval($_GP['id'])));
message("删除成功!", "refresh", "success");
exit;
}
if ($operation == 'post') {
$id = intval($_GP['id']);
$pro = mysqld_select("select * from " . table('shop_pormotions') . "where id=:id limit 1", array(':id' => $id));
if (checksubmit('submit')) {
$data = array('promoteType' => $_GP['radioPromotionType'], 'condition' => (int) intval($_GP['promotionmoney']), 'pname' => $_GP['promotionname'], 'starttime' => strtotime($_GP['start_time']), 'endtime' => strtotime($_GP['end_time']), 'description' => $_GP['description']);
if ($data['starttime'] > $data['endtime']) {
message('设置错误,开始时间不能大于结束时间', 'refresh', 'error');
return;
}
if (empty($data['pname'])) {
message('请输入活动名称', 'refresh', 'error');
return;
}
if (empty($data['condition'])) {
message('请输入满额(件)数量', 'refresh', 'error');
return;
}
if (!empty($id)) {