當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。