当前位置: 首页>>代码示例>>PHP>>正文


PHP oseDB::unlock方法代码示例

本文整理汇总了PHP中oseDB::unlock方法的典型用法代码示例。如果您正苦于以下问题:PHP oseDB::unlock方法的具体用法?PHP oseDB::unlock怎么用?PHP oseDB::unlock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oseDB的用法示例。


在下文中一共展示了oseDB::unlock方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getloginRedirect

 function getloginRedirect($msc_id)
 {
     $db = oseDB::instance();
     oseDB::lock('#__menu');
     $objs = array();
     $where = array();
     //$where = array_merge($where,oseJSON::generateQueryWhere());
     // Added in V 4.4, menu access levels
     //$where[] = 'm.menutype = '.$db->Quote($menutype);
     $where[] = 'm.published != -2';
     $where[] = 'm.client_id = 0';
     $where = count($where) ? ' WHERE (' . implode(') AND (', $where) . ')' : '';
     $query = 'SELECT m.*,  com.name AS com_name' . ' FROM `#__menu` AS m' . ' LEFT JOIN `#__extensions` AS com ON com.extension_id = m.component_id' . $where . ' ORDER BY m.lft';
     $db->setQuery($query);
     //oseExit($db->getQuery());
     $menus = $db->loadObjectList();
     $i = 0;
     if (!empty($menus)) {
         foreach ($menus as $menu) {
             $objs[$i]->menuid = $menu->id;
             $objs[$i]->displayText = str_repeat('<span class="gtr">|&mdash;</span>', $menu->level) . '[ID-' . $menu->id . ']-' . $menu->title;
             $i++;
         }
     }
     oseDB::unlock();
     return $objs;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:27,代码来源:membership_j16.php

示例2: getProperty

 function getProperty($msc_id)
 {
     $db = oseDB::instance();
     oseDB::lock('#__osemsc_acl READ');
     $query = " SELECT * FROM `#__osemsc_acl`" . " WHERE id = {$msc_id}";
     $db->setQuery($query);
     $item = oseDB::loadItem();
     oseDB::unlock();
     return $item;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:10,代码来源:membership.php

示例3: orderChange

 public static function orderChange($node, $ordering)
 {
     $db = oseDB::instance();
     $current = $node;
     $type = $db->Quote($current->type);
     oseDB::lock('#__osemsc_addon');
     $query = " SELECT * FROM `#__osemsc_addon`" . " WHERE type={$type} AND ordering= {$ordering} ";
     $db->setQuery($query);
     // get the Current Msc paranet ID
     $obj = $db->loadObject();
     if ($current->ordering > $ordering) {
         $query = " UPDATE `#__osemsc_addon` " . " SET ordering= ordering+1 " . " WHERE ordering >= {$ordering} AND ordering < {$current->ordering} " . " AND type={$type}";
         $db->setQuery($query);
         if (!oseDB::query()) {
             oseDB::unlock();
             return false;
         }
         $query = " UPDATE `#__osemsc_addon` " . " SET ordering= {$ordering} " . " WHERE id = {$current->id} ";
         $db->setQuery($query);
         if (!oseDB::query()) {
             oseDB::unlock();
             return false;
         }
     } else {
         $query = " UPDATE `#__osemsc_addon` " . " SET ordering= ordering-1 " . " WHERE ordering <= {$ordering} AND ordering > {$current->ordering} " . " AND type={$type}";
         $db->setQuery($query);
         if (!oseDB::query()) {
             oseDB::unlock();
             return false;
         }
         $query = " UPDATE `#__osemsc_addon` " . " SET ordering= {$ordering} " . " WHERE id = {$current->id} ";
         $db->setQuery($query);
         if (!oseDB::query()) {
             oseDB::unlock();
             return false;
         }
     }
     oseDB::unlock();
     return true;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:40,代码来源:oseMscAddon.php

示例4: query

 public static function query($unlock = false)
 {
     $testMode = 1;
     $db = oseDB::instance();
     if (!$db->query()) {
         if ($testMode == 1) {
             oseExit($db->getErrorMsg());
         }
         if ($unlock) {
             oseDB::unlock();
         }
         return false;
     }
     return true;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:15,代码来源:osedb.php

示例5: getNodeByOrder

 public static function getNodeByOrder($parent_id, $ordering, $type = 'array')
 {
     $db = oseDB::instance();
     oseDB::lock('#__osemsc_acl READ');
     $query = " SELECT * FROM `#__osemsc_acl`" . " WHERE parent_id = {$parent_id} AND ordering = {$ordering} ";
     $db->setQuery($query);
     $obj = oseDB::loadItem($type);
     oseDB::unlock();
     return $obj;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:10,代码来源:oseMscTree.php

示例6: retrieveTree

 function retrieveTree($type = 'array')
 {
     $db = oseDB::instance();
     //$searchName = $db->Quote($msc_id);
     $query = "LOCK TABLE `#__osemsc_acl` AS node READ, `#__osemsc_acl` AS parent READ";
     $db->setQuery($query);
     oseDB::query();
     $where = array();
     $where[] = 'node.lft BETWEEN parent.lft AND parent.rgt';
     $where = oseDB::implodeWhere($where);
     $query = " SELECT node.*,CONCAT( REPEAT('--', COUNT(parent.id)-1), node.title) AS treename\n " . " FROM `#__osemsc_acl` AS node,`#__osemsc_acl` AS parent" . $where . " GROUP BY node.id " . " ORDER BY node.lft; ";
     $db->setQuery($query);
     //oseExit($db->_sql);
     $objs = oseDB::loadList($type);
     oseDB::unlock();
     //oseExit($objs);
     return $objs;
     //return oseMscTree::retrieveTree($msc_id,$type);
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:19,代码来源:membership_j15.php


注:本文中的oseDB::unlock方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。