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


PHP BD::delete方法代码示例

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


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

示例1: deletetrajet

function deletetrajet($idtrajet, $iduser)
{
    $BD = new BD('trajet');
    $BD->delete("idtrajet", $idtrajet);
    $BD->setUsedTable('user');
    $BD->decr("nbtrajet", "iduser", $iduser);
}
开发者ID:sebspas,项目名称:Share2Go,代码行数:7,代码来源:profil.php

示例2: BD

<?php

ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
session_start();
require_once '../Config.class.php';
require_once '../../../app/Bd.class.php';
$BD = new BD('connecté');
$BD->delete('iduser', $_SESSION['iduser']);
$_SESSION = array();
if (isset($_COOKIE[session_name()])) {
    setcookie(session_name(), '', time() - 4200, '/');
}
session_destroy();
header('Location: http://51.255.41.18/Aurora/m/');
开发者ID:sebspas,项目名称:Aurora,代码行数:15,代码来源:logout.php

示例3: BD

if (isset($_REQUEST["accion"])) {
    $accion = $_REQUEST["accion"];
} else {
    $accion = "";
}
if (isset($_REQUEST["id_persona"])) {
    $id_persona = $_REQUEST["id_persona"];
} else {
    $id_persona = "";
}
if ($accion == "eliminar") {
    $bd = new BD();
    $bd->beginTransaction();
    try {
        $parametros = array("id_persona" => $id_persona);
        $res = $bd->delete(tablas::USUARIOS, $parametros);
        if ($bd->myException->getEstado() == 0) {
            $res1 = $bd->delete(tablas::PERSONAS, $parametros);
            if ($bd->myException->getEstado() == 0) {
                $estado = "ok";
                $mensaje = Mensajes::REGISTRO_ELIMINADO;
                $bd->commit();
            } else {
                $bd->rollBack();
                $estado = "error";
                $mensaje = $bd->myException->getMensaje();
            }
        } else {
            $bd->rollBack();
            $estado = "error";
            $mensaje = $bd->myException->getMensaje();
开发者ID:eguaman1990,项目名称:AdminProjects,代码行数:31,代码来源:usuarioDeleteController.php

示例4: BD

 $bd = new BD();
 $bd->start_transaction();
 if ($_POST['id'] == 0) {
     $dados['status'] = "Ativo";
     $bd->insert('produtos', $dados);
     $_POST['id'] = $bd->get("insert_id");
 }
 //UPDATE - produtos
 $table = 'produtos';
 $dados = array("nome_produto" => "'" . $_POST['nome_produto'] . "'", "detalhamento" => "'" . $_POST['detalhamento'] . "'", "cod_linha" => $_POST['linha'], "status" => "'" . $_POST['status'] . "'", "url" => "'" . $_POST['url'] . "'", "fios" => $_POST['fios'], "desconto" => "'" . $_POST['desconto'] . "'", "substituido" => $_POST['substituido_por']);
 $where = "codigo={$_POST['id']}";
 $bd->update($table, $dados, $where);
 //DELETE - produto_aplicacao
 $table1 = "produto_aplicacao";
 $where1 = "cod_produto={$_POST['id']}";
 $bd->delete($table1, $where1);
 //INSERT - produto_aplicacao
 foreach (array_keys($_POST) as $k) {
     if (preg_match('/^aplicacao_/', $k)) {
         $dados2 = array("cod_produto" => $_POST['id'], "cod_aplicacao" => $_POST[$k]);
         $bd->insert($table1, $dados2);
     }
 }
 //DELETE - produto_veiculo
 $table2 = "produto_veiculo";
 $str = "";
 foreach (array_keys($_POST) as $k) {
     if (preg_match('/^veiculo_registrado_/', $k)) {
         $str .= " AND codigo<>{$_POST[$k]}";
     }
 }
开发者ID:rodrigodeus,项目名称:lockal-1,代码行数:31,代码来源:update_produto.php

示例5: deleteEvent

function deleteEvent($idevent)
{
    $BD = new BD('participant');
    $BD->delete('idevent', $idevent);
    $BD->setUsedTable('event');
    $BD->delete('idevent', $idevent);
}
开发者ID:sebspas,项目名称:AFK-WEB,代码行数:7,代码来源:admin.php

示例6: removeCom

function removeCom($idcom)
{
    $BD = new BD('commentaire');
    $BD->delete('idcommentaire', $idcom);
}
开发者ID:sebspas,项目名称:AFK-WEB,代码行数:5,代码来源:section.php

示例7: date

foreach ($donnees as $value) {
    print_r($value);
    echo "</br>";
}
/* Test update */
$BD->update("nom", "Jeanne", "nom", "Jean");
echo "<h2>Test Fonction UPDATE </h2></br>";
$donnees = $BD->selectAll();
foreach ($donnees as $value) {
    print_r($value);
    echo "</br>";
    echo "{$value->nom}";
    echo "</br>";
}
/* Test delete */
$BD->delete("nom", "Jeanne");
echo "<h2>Test Fonction DELETE </h2></br>";
$donnees = $BD->selectAll();
foreach ($donnees as $value) {
    print_r($value);
    echo "</br>";
    echo "{$value->nom}";
    echo "</br>";
}
echo "<h2>Test Changement de table </h2></br>";
echo "Objet crée sur la table : " . $BD->getUsedTable() . "</br>";
$BD->setUsedTable("trajet");
echo "Objet modifier sur la table : " . $BD->getUsedTable() . "</br>";
/* Test Fonction addTrajet */
$BD->addTrajet("Boulogne", "Bois", date("H:i:s"), date("H:i:s"), 50, 2, "Fiat Punto", 1);
echo "<h2>Test Fonction addTrajet </h2></br>";
开发者ID:sebspas,项目名称:Share2Go,代码行数:31,代码来源:bd_class_test.php


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