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


PHP table::delete方法代码示例

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


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

示例1: table

 function action_comments_remove()
 {
     $comm = new table("comments");
     $id = intval($_GET["id"]);
     $comm->delete($id);
     show_msg("删除成功", $_SERVER["HTTP_REFERER"]);
 }
开发者ID:xurenlu,项目名称:tik,代码行数:7,代码来源:m.php

示例2: testDelete

 /**
  * 
  * @dataProvider tabeleTrue
  * 
  */
 public function testDelete($tabel, $args, $id)
 {
     $table = new table($tabel, $id);
     $this->assertNotEmpty($table->getData(), 'This' . $id . ' failed');
     $table->delete();
     $this->assertEmpty($table->getData(), $id);
     $table = new table($tabel, $id);
     $this->assertEmpty($table->getData());
 }
开发者ID:rolisz,项目名称:framework,代码行数:14,代码来源:tableTest.php

示例3: controllerRouterQueue

function controllerRouterQueue($routerId, $mode, $userId = false)
{
    if (!$routerId) {
        return;
    }
    //Add entry to updqueue table
    $updqueueTable = new table('routerupdatequeue');
    $updqueueTable->setLogging(false);
    // Check for the same action records
    $req = "WHERE router={$routerId} AND mode='{$mode}'";
    if ($userId) {
        $req .= " AND user={$userId}";
    }
    $similarRes = $updqueueTable->load($req);
    if (!count($similarRes)) {
        $updqueueTable->add(array('router' => $routerId, 'mode' => $mode, 'user' => $userId));
    }
    //fork('/updaterouter.php', false);
    $unavailableRouters = array();
    $queRes = $updqueueTable->load("WHERE `router`={$routerId}");
    foreach ($queRes as $queRow) {
        if (controllerRouter($queRow['router'], $queRow['mode'], $queRow['user']) || controllerRouter($queRow['router'], 'checkConnection', $queRow['user'])) {
            $updqueueTable->delete(array('id' => $queRow['id']));
        } else {
            break;
        }
    }
}
开发者ID:carriercomm,项目名称:Nuance,代码行数:28,代码来源:core.php

示例4: unset

         }
     }
 }
 // Extract cash difference from user and proceed as moneflow
 if ($target == 'user' && ($action == 'dbedit' || $action == 'dbadd') && isset($data['cash'])) {
     unset($data['cash']);
 }
 switch ($action) {
     case 'dbadd':
         $id = $table->add($data);
         break;
     case 'dbedit':
         $id = $table->edit($data);
         break;
     case 'dbremove':
         $id = $table->delete($data);
         break;
 }
 if ($target == 'user' && ($action == 'dbedit' || $action == 'dbadd') && isset($_POST['cash']) && checkPermission($sessionId, array('table', $target, 'edit', 'cash'))) {
     if ($action === 'dbedit') {
         $user = $table->loadById($id);
         $sum = money($_POST['cash']) - money($user['cash']);
     } else {
         $sum = money($_POST['cash']);
     }
     if ($sum) {
         $moneyflowTable = new table('moneyflow');
         $moneyflowTable->add(array("user" => $id, "sum" => $sum, "detailsname" => "adminpay", "detailsid" => $sessionId));
     }
     payment(0, $id);
 }
开发者ID:carriercomm,项目名称:Nuance,代码行数:31,代码来源:ajax.php


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