本文整理汇总了PHP中collection::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP collection::delete方法的具体用法?PHP collection::delete怎么用?PHP collection::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类collection
的用法示例。
在下文中一共展示了collection::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDownAfterClass
public static function tearDownAfterClass()
{
if (self::$object instanceof \collection) {
self::$object->delete();
}
self::$object = self::$objectDisable = null;
parent::tearDownAfterClass();
}
示例2: collection
$collection = new collection($id);
$collection->replace_form();
} else {
// routine de remplacement
$collection = new collection($id);
$rep_result = $collection->replace($by, $aut_link_save);
if (!$rep_result) {
include './autorites/collections/collections_list.inc.php';
} else {
error_message($msg[132], $rep_result, 1, "./autorites.php?categ=collections&sub=collection_form&id={$id}");
}
}
break;
case 'delete':
$coll = new collection($id);
$sup_result = $coll->delete();
if (!$sup_result) {
include './autorites/collections/collections_list.inc.php';
} else {
error_message($msg[132], $sup_result, 1, "./autorites.php?categ=collections&sub=collection_form&id={$id}");
}
break;
case 'update':
// mettre à jour collection id
// mise à jour d'une collection
$collection_nom = clean_string($collection_nom);
if (!$collection_nom || !$ed_id) {
error_message($msg[132], $mg['erreur_creation_collection'], 1, "");
} else {
$coll = array('name' => $collection_nom, 'parent' => $ed_id, 'collection_web' => $collection_web, 'issn' => $issn, 'comment' => $comment);
$collection = new collection($id);
示例3: urldecode
}
require_once "{$class_path}/collection.class.php";
// la taille d'un paquet de notices
$lot = COLLECTION_PAQUET_SIZE;
// defini dans ./params.inc.php
// taille de la jauge pour affichage
$jauge_size = GAUGE_SIZE;
// initialisation de la borne de départ
if (!isset($start)) {
$start = 0;
}
$v_state = urldecode($v_state);
print "<br /><br /><h2 align='center'>" . htmlentities($msg["nettoyage_suppr_collections"], ENT_QUOTES, $charset) . "</h2>";
$query = mysql_query("SELECT collection_id from collections left join notices on collection_id=coll_id left join sub_collections on sub_coll_parent=collection_id where coll_id is null and sub_coll_parent is null ");
$affected = 0;
if ($affected = mysql_num_rows($query)) {
while ($ligne = mysql_fetch_object($query)) {
$coll = new collection($ligne->collection_id);
$coll->delete();
}
}
//Nettoyage des informations d'autorités pour les collections
collection::delete_autority_sources();
$query = mysql_query("update notices left join collections ON collection_id=coll_id SET coll_id=0, subcoll_id=0 WHERE collection_id is null");
$spec = $spec - CLEAN_COLLECTIONS;
$v_state .= "<br /><img src=../../images/d.gif hspace=3>" . htmlentities($msg["nettoyage_suppr_collections"], ENT_QUOTES, $charset) . " :";
$v_state .= $affected . " " . htmlentities($msg["nettoyage_res_suppr_collections"], ENT_QUOTES, $charset);
$opt = mysql_query('OPTIMIZE TABLE collections');
// mise à jour de l'affichage de la jauge
print "<table border='0' align='center' width='{$table_size}' cellpadding='0'><tr><td class='jauge'>\n \t\t<img src='../../images/jauge.png' width='{$jauge_size}' height='16'></td></tr></table>\n \t\t<div align='center'>100%</div>";
print "\n\t<form class='form-{$current_module}' name='process_state' action='./clean.php' method='post'>\n\t\t<input type='hidden' name='v_state' value=\"" . urlencode($v_state) . "\">\n\t\t<input type='hidden' name='spec' value=\"{$spec}\">\n\t\t</form>\n\t<script type=\"text/javascript\"><!--\n\t\tdocument.forms['process_state'].submit();\n\t\t-->\n\t</script>";