本文整理匯總了PHP中module_controller::type方法的典型用法代碼示例。如果您正苦於以下問題:PHP module_controller::type方法的具體用法?PHP module_controller::type怎麽用?PHP module_controller::type使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類module_controller
的用法示例。
在下文中一共展示了module_controller::type方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DeleteType
static function DeleteType()
{
global $zdbh;
global $controller;
$numrecords = 0;
$type = $controller->GetControllerRequest('FORM', 'inType');
$sql = "SELECT COUNT(*) FROM x_dns WHERE dn_type_vc = :type AND dn_deleted_ts IS NULL";
$numrows = $zdbh->prepare($sql);
$numrows->bindParam(':type', $type);
if ($numrows->execute()) {
if ($numrows->fetchColumn() != 0) {
$type = $controller->GetControllerRequest('FORM', 'inType');
$sql = $zdbh->prepare("SELECT * FROM x_dns WHERE dn_type_vc = :type AND dn_deleted_ts IS NULL");
$sql->bindParam(':type', $type);
$sql->execute();
while ($row = $sql->fetch()) {
$time = time();
$type = $controller->GetControllerRequest('FORM', 'inType');
$delete_record = $zdbh->prepare("UPDATE x_dns SET dn_deleted_ts=:time WHERE dn_id_pk = :dn_id_pk AND dn_type_vc = :type");
$delete_record->bindParam(':time', $time);
$delete_record->bindParam(':dn_id_pk', $row['dn_id_pk']);
$delete_record->bindParam(':type', $type);
$delete_record->execute();
$numrecords++;
}
self::$deletedtype = $numrecords;
self::$type = $controller->GetControllerRequest('FORM', 'inType');
}
}
}