本文整理汇总了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);
}