本文整理匯總了PHP中CRUD::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRUD::delete方法的具體用法?PHP CRUD::delete怎麽用?PHP CRUD::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRUD
的用法示例。
在下文中一共展示了CRUD::delete方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
</table>
<table>
<tr>
<td></td>
<td></td>
<td><b><h2> Rp. <?php
echo $total_bil;
?>
</h2></b></td>
</tr>
</table>
<?php
if (@$_GET['page'] == 'hapus') {
$id = @$_GET['no'];
$crud->delete("keranjang", "noo= '{$id}'");
}
?>
<a href="#"><center><img src="img-icon/selesai.png" width="80px"></center></a>
</div>
</div>
</header>
<!--data makanan php -->
<!-- Thumbnail -->
<section id="thumbnails">
<?php
$no = 1;
示例2: delete
public static function delete($id)
{
$id = $_POST[$id];
$crud = new CRUD();
$crud->delete('prova2', ' WHERE id=? ', array($id));
}
示例3:
<input type="text" name="harga" class="form-control" placeholder="" required >
<input type="text" name="id" value="" name="id">
<br>
<button type="submit" class="btn btn-success" name="edit">Masukan</button>
</div>
</form>
</div>
</div>
</table>
</div>
</div>
<?php
if (@$_GET['page'] == 'hapus') {
$id = @$_GET['no'];
echo "{$id}";
$crud->delete("makanan", "no = '{$id}'");
}
?>
<div class="tab-pane fade" id="datapegawai">
<table class="table table-striped">
<thead>
<tr>
<th>No</th>
<th>Nama </th>
<th>Username</th>
<th>alamat</th>
<th>Telepon</th>
示例4: CRUD
<?php
require_once "/../class/ConDB.class.php";
$idpergunta = $_GET['id'];
$crud = new CRUD();
$crud->delete('faq', ' WHERE id=? ', array($idpergunta));
//print $idpergunta;
示例5: delete
/**
* Deleta o objeto especificado <br />
* Ex.: <br />
* $produto = new Produto(); <br />
* $produto->setId(1); <br />
* $produto->delete(); <br />
*
* @param mixed $object
* @param string $whereCondition
* @return boolean
*/
public static function delete($classOrObject, $whereCondition = "")
{
$crud = new CRUD($classOrObject);
$obj = self::getInstance($classOrObject);
return $crud->delete($obj, $whereCondition);
}