本文整理匯總了PHP中Zone::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zone::delete方法的具體用法?PHP Zone::delete怎麽用?PHP Zone::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zone
的用法示例。
在下文中一共展示了Zone::delete方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: delete
public function delete()
{
$this->query("UPDATE " . Pays::TABLE . " SET zone='-1' WHERE zone=" . $this->id);
parent::delete();
redirige("zone.php");
}
示例2: Zone
exit;
}
require_once "../fonctions/divers.php";
require_once "liste/zone.php";
if ($_POST['action'] == "ajouter" && $_POST['nomzone'] != "") {
$zone = new Zone();
$zone->nom = $_POST['nomzone'];
$id = $zone->add();
} else {
if ($_GET['action'] == "supprimer" && $_GET['id'] != "") {
$zone = new Zone();
$pays = new Pays();
$query = "update {$pays->table} set zone=\"-1\" where zone=\"" . $_GET['id'] . "\"";
$resul = mysql_query($query, $pays->link);
$zone->charger($_GET['id']);
$zone->delete();
}
}
if ($_REQUEST['id'] != "") {
$id = $_REQUEST['id'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
require_once "title.php";
require_once "js/zone.php";
?>
</head>
示例3:
<?php
Zone::delete($_GET['id']);
header("Location: " . e_SELF);