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