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


PHP Table::Delete方法代码示例

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


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

示例1: Unsubscribe

 public static function Unsubscribe($subscribe)
 {
     Table::Delete('subscribe', $subscribe['email'], 'email');
     /* notice */
     $host = $_SERVER['HTTP_HOST'];
     /*
     $u = "http://notice.zuitu.com/unsubscribe.php?email={$subscribe['email']}&secret={$subscribe['secret']}&host={$host}";
     Utility::HttpRequest($u);
     */
 }
开发者ID:jowino,项目名称:bd786110cact,代码行数:10,代码来源:ZSubscribe.class.php

示例2: DeleteTeam

 public static function DeleteTeam($id)
 {
     $orders = Table::Fetch('order', array($id), 'team_id');
     foreach ($orders as $one) {
         if ($one['state'] == 'pay') {
             return false;
         }
         if ($order['card_id']) {
             Table::UpdateCache('card', $order['card_id'], array('team_id' => 0, 'order_id' => 0, 'consume' => 'N'));
         }
         Table::Delete('order', $one['id']);
     }
     return Table::Delete('team', $id);
 }
开发者ID:hhdem,项目名称:tuangala_v2,代码行数:14,代码来源:ZTeam.class.php

示例3: Enable

 public static function Enable($mobile, $enable = false, $user_id = '')
 {
     $condition = array('tools' => $mobile, 'enable' => 'Y');
     $remove = DB::GetTableRow('toolsbind', $condition);
     if ($remove) {
         Table::Delete('toolsbind', $remove['id']);
     }
     $havecondition = array('user_id' => $user_id, 'enable' => 'Y');
     $removeold = DB::GetTableRow('toolsbind', $havecondition);
     if ($removeold) {
         Table::Delete('toolsbind', $removeold['id']);
     }
     $sms = Table::Fetch('toolsbind', $mobile, 'tools');
     $time = time();
     if ($sms) {
         Table::UpdateCache('toolsbind', $sms['id'], array('enable' => 'Y', 'create_time' => $time));
         Table::UpdateCache('user', $sms['user_id'], array('mobile' => $mobile, 'mobilecode' => 'yes', 'enable' => 'Y'));
     }
 }
开发者ID:norain2050,项目名称:zuituware,代码行数:19,代码来源:ZToolsbind.class.php

示例4: array

	));
	$cond = array( 'team_id' => $id );
	$count = Table::Count('voucher', $cond);
	Table::UpdateCache('team', $id, array('max_number'=> $count));
	Session::Set('notice', '未下发的商户券清空完成');
	json(null, 'refresh');
}
if ( 'removeonevoucher' == $action ) {
	$vid = strval($_GET['vid']);
	$voucher = Table::Fetch('voucher', $vid);
	if ($voucher['order_id']) {
		json('商户券已分配,不可删除', 'alert');
	} else if (!$voucher ) {
		json('商户券不存在', 'alert');
	}
	Table::Delete('voucher', $vid);
	$cond = array( 'team_id' => $voucher['team_id'] );
	$count = Table::Count('voucher', $cond);
	Table::UpdateCache('team', $voucher['team_id'],
			array( 'max_number' => $count ));
	Session::Set('notice', '商户券删除成功');
	json(null, 'refresh');
}
else if('smsexpress' == $action ) {
	$con_pay = array(
			'team_id' => $id,
			'state' => 'pay',
			);
	$con_smsneed = array(
			'team_id' => $id,
			'state' => 'pay',
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:ajax.php

示例5: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
need_manager();
need_auth('market');
$action = strval($_GET['action']);
$id = abs(intval($_GET['id']));
$r = udecode($_GET['r']);
$cate = strval($_GET['cate']);
$like = strval($_GET['like']);
if ($action == 'r') {
    Table::Delete('feedback', $id);
    redirect($r);
} else {
    if ($action == 'm') {
        Table::UpdateCache('feedback', $id, array('user_id' => $login_user_id));
        redirect($r);
    }
}
$condition = array();
if ($cate) {
    $condition['category'] = $cate;
}
if ($like) {
    $condition[] = "content like '%" . mysql_escape_string($like) . "%'";
}
$count = Table::Count('feedback', $condition);
list($pagesize, $offset, $pagestring) = pagestring($count, 20);
$asks = DB::LimitQuery('feedback', array('condition' => $condition, 'order' => 'ORDER BY id DESC', 'size' => $pagesize, 'offset' => $offset));
$user_ids = Utility::GetColumn($asks, 'user_id');
$users = Table::Fetch('user', $user_ids);
开发者ID:hhdem,项目名称:tuangala_v2,代码行数:31,代码来源:feedback.php

示例6: dirname

<?php

require_once dirname(dirname(__FILE__)) . '/app.php';
need_login();
$action = strval($_GET['action']);
$aid = strval($_GET['id']);
if ('modify' == $action) {
    if ($aid) {
        $address = Table::Fetch('user_address', $aid);
        if (!$address) {
            json('无数据', 'alert');
        }
    }
    $html = render('ajax_dialog_address');
    json($html, 'dialog');
} else {
    if ($action == 'delete') {
        $addr = Table::Fetch('user_address', $aid);
        if (!$addr) {
            json('无数据', 'alert');
        }
        Table::Delete('user_address', $aid);
        Session::Set('notice', '删除地址成功');
        json(null, 'refresh');
    }
}
开发者ID:hhdem,项目名称:tuangala_v2,代码行数:26,代码来源:address.php

示例7: array

            $field = "image{$v}";
            $relpath = $team[$field];
            $abspath = WWW_ROOT . '/static/' . $relpath;
            if (file_exists($abspath) && @unlink($abspath)) {
                Table::UpdateCache('team', $id, array($field => null));
                json(array(array('data' => '删除图片成功', 'type' => 'alert'), array('data' => "X.team.imageremovecall({$v});", 'type' => 'eval')), 'mix');
            }
            json('删除图片失败', 'alert');
        } else {
            if ('link' == $action) {
                if ($id) {
                    $link = Table::Fetch('friendlink', $id);
                }
                $html = render('manage_ajax_dialog_misclink');
                json($html, 'dialog');
            } else {
                if ('linkremove' == $action) {
                    if ($id) {
                        $link = Table::Fetch('friendlink', $id);
                    }
                    if (!$link) {
                        json('输入信息不正确', 'alert');
                    }
                    Table::Delete('friendlink', $id);
                    Session::Set('notice', '删除链接成功');
                    json(null, 'refresh');
                }
            }
        }
    }
}
开发者ID:yunsite,项目名称:hhzuitu,代码行数:31,代码来源:misc.php

示例8: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
need_manager();
$id = abs(intval($_GET['id']));
$team = Table::Fetch('team', $id);
$order = Table::Fetch('order', $id, 'team_id');
if ($order) {
    Session::Set('notice', "删除团购({$id})记录失败,存在订单记录");
} else {
    Table::Delete('team', $id);
    Session::Set('notice', "删除团购({$id})记录成功");
}
Utility::Redirect(udecode($_GET['r']));
开发者ID:BGCX262,项目名称:zuitu-svn-to-git,代码行数:14,代码来源:remove.php

示例9: Unsubscribe

 public static function Unsubscribe($subscribe)
 {
     Table::Delete('subscribe', $subscribe['email'], 'email');
 }
开发者ID:yunsite,项目名称:hhzuitu,代码行数:4,代码来源:ZSubscribe.class.php

示例10: dirname

<?php

require_once dirname(dirname(__FILE__)) . '/app.php';
need_manager();
$action = strval($_GET['action']);
$id = $topic_id = abs(intval($_GET['id']));
$topic = Table::Fetch('topic', $id);
$pid = abs(intval($topic['parent_id']));
if (!$topic || !$id) {
    json('话题不存在', 'alert');
} elseif ($action == 'topicremove') {
    if ($pid == 0) {
        Table::Delete('topic', $id);
        Table::Delete('topic', $id, 'parent_id');
    } else {
        Table::Delete('topic', $id);
        Table::UpdateCache('topic', $pid, array('reply_number' => Table::Count('topic', array('parent_id' => $pid))));
    }
    Session::Set('notice', '删除帖子成功');
    json(null, 'refresh');
} elseif ($action == 'topichead') {
    if ($topic['parent_id'] > 0) {
        json('只有主话题才能置顶', 'alert');
    }
    $head = $topic['head'] == 0 ? time() : 0;
    Table::UpdateCache('topic', $id, array('head' => $head));
    $tip = $head ? '设置话题置顶成功' : '取消话题置顶成功';
    Session::Set('notice', $tip);
    json(null, 'refresh');
}
开发者ID:yunsite,项目名称:hhzuitu,代码行数:30,代码来源:topic.php

示例11: Table

        exit;
    }
    $table = new Table('vote_question', $question);
    $up_array = array('is_show');
    $flag = $table->update($up_array);
    if ($flag) {
        Session::Set('notice', '修改状态成功');
    } else {
        Session::Set('error', '修改状态失败');
    }
    Utility::Redirect(WEB_ROOT . '/manage/vote/question.php?action=list-all');
    exit;
    //删除
} elseif ($action == 'del') {
    $question['id'] = isset($_GET['id']) ? $_GET['id'] : '0';
    $flag = Table::Delete('vote_question', $question['id']);
    if ($flag) {
        Session::Set('notice', '删除成功');
    } else {
        Session::Set('error', '删除失败');
    }
    Utility::Redirect(WEB_ROOT . '/manage/vote/question.php?action=list-all');
    exit;
    //编辑问题
} elseif ($action == 'edit') {
    $id = isset($_GET['id']) && is_numeric($_GET['id']) ? $_GET['id'] : 0;
    $question = Table::Fetch('vote_question', $id);
    if (!$question) {
        Session::Set('error', '此问题不存在,请先添加。');
        Utility::Redirect(WEB_ROOT . '/manage/vote/question.php?action=add');
        exit;
开发者ID:yunsite,项目名称:hhzuitu,代码行数:31,代码来源:question.php

示例12: need_auth

need_auth('market');
$action = strval($_GET['action']);
$id = abs(intval($_GET['id']));
if ('edit' == $action) {
    if ($id) {
        $goods = Table::Fetch('goods', $id);
        if (!$goods) {
            json('无数据', 'alert');
        }
    }
    $html = render('manage_ajax_dialog_goodsedit');
    json($html, 'dialog');
} elseif ('remove' == $action) {
    $goods = Table::Fetch('goods', $id);
    if (!$goods) {
        json('无数据', 'alert');
    }
    Table::Delete('goods', $id);
    Session::Set('notice', '删除商品成功');
    json(null, 'refresh');
} elseif ('disable' == $action) {
    $goods = Table::Fetch('goods', $id);
    if (!$goods) {
        json('无数据', 'alert');
    }
    $enable = $goods['enable'] == 'Y' ? 'N' : 'Y';
    $enablestring = $goods['enable'] == 'Y' ? '禁用' : '启用';
    Table::UpdateCache('goods', $id, array('enable' => $enable));
    Session::Set('notice', "{$enablestring}兑换商品成功");
    json(null, 'refresh');
}
开发者ID:hhdem,项目名称:tuangala_v2,代码行数:31,代码来源:ajax.php

示例13: json

                                                                                            json(array(array('data' => "修改备注信息成功", 'type' => 'alert'), array('data' => null, 'type' => 'refresh')), 'mix');
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
if ('newsremove' == $action) {
    need_auth('news');
    $news = Table::Fetch('news', $id);
    Table::Delete('news', $id);
    Session::Set('notice', "新闻 {$id} 删除成功!");
    json(null, 'refresh');
}
开发者ID:norain2050,项目名称:zuituware,代码行数:31,代码来源:manage.php

示例14: UnSubscribe

 public static function UnSubscribe($mobile)
 {
     Table::Delete('smssubscribe', $mobile, 'mobile');
 }
开发者ID:norain2050,项目名称:zuituware,代码行数:4,代码来源:ZSMSSubscribe.class.php

示例15: dirname

<?php

require_once dirname(dirname(__FILE__)) . '/app.php';
need_login();
$action = strval($_GET['action']);
$id = strval($_GET['id']);
$v = strval($_GET['v']);
if ('bindcancel' == $action) {
    Table::UpdateCache('user', $login_user['id'], array('mobilecode' => null));
    json(array(array('data' => '取消手机绑定成功', 'type' => 'alert'), array('data' => null, 'type' => 'refresh')), 'mix');
} else {
    if ('deladd' == $action) {
        Table::Delete('address', $id);
        json(array(array('data' => '删除地址成功', 'type' => 'alert'), array('data' => null, 'type' => 'refresh')), 'mix');
    } else {
        if ('setdefault' == $action) {
            DB::Update('address', array('user_id' => $login_user['id'], 'default' => 'Y'), array('default' => 'N'));
            DB::Update('address', array('id' => $id), array('default' => 'Y'));
            json(array(array('data' => '设置成功', 'type' => 'alert'), array('data' => null, 'type' => 'refresh')), 'mix');
        }
    }
}
开发者ID:norain2050,项目名称:zuituware,代码行数:22,代码来源:ajax.php


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