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


PHP PDOConnect::exists方法代码示例

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


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

示例1: getChildTypes

 /**
  * Returns an array containing the type of children owned by the group
  * @param int $groupId
  * @return array[string]
  * @throws Exception
  */
 public function getChildTypes($groupId)
 {
     try {
         $types = array();
         if (PDOConnect::exists('SELECT GroupID FROM lkdatasetgroup WHERE GroupID = :groupId', array('groupId' => $groupId))) {
             $types[] = 'data sets';
         }
         if (PDOConnect::exists('SELECT GroupID FROM lkdisplaygroupgroup WHERE GroupID = :groupId', array('groupId' => $groupId))) {
             $types[] = 'display groups';
         }
         if (PDOConnect::exists('SELECT GroupID FROM lkcampaigngroup WHERE GroupID = :groupId', array('groupId' => $groupId))) {
             $types[] = 'layouts and campaigns';
         }
         if (PDOConnect::exists('SELECT GroupID FROM lklayoutmediagroup WHERE GroupID = :groupId', array('groupId' => $groupId))) {
             $types[] = 'media on layouts';
         }
         if (PDOConnect::exists('SELECT GroupID FROM lklayoutregiongroup WHERE GroupID = :groupId', array('groupId' => $groupId))) {
             $types[] = 'regions on layouts';
         }
         if (PDOConnect::exists('SELECT GroupID FROM lkmediagroup WHERE GroupID = :groupId', array('groupId' => $groupId))) {
             $types[] = 'media';
         }
         return $types;
     } catch (Exception $e) {
         Debug::Error($e->getMessage());
         throw $e;
     }
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:34,代码来源:usergroup.data.class.php

示例2: getChildTypes

 /**
  * Returns an array containing the type of children owned by the user
  * @return array[string]
  * @throws Exception
  */
 public function getChildTypes()
 {
     if (!isset($this->userId) || $this->userId == 0) {
         return $this->SetError(__('Missing userId'));
     }
     try {
         $types = array();
         if (PDOConnect::exists('SELECT LayoutID FROM layout WHERE UserID = :userId', array('userId' => $this->userId))) {
             $types[] = 'layouts';
         }
         if (PDOConnect::exists('SELECT MediaID FROM media WHERE UserID = :userId', array('userId' => $this->userId))) {
             $types[] = 'media';
         }
         if (PDOConnect::exists('SELECT EventID FROM schedule WHERE UserID = :userId', array('userId' => $this->userId))) {
             $types[] = 'scheduled layouts';
         }
         if (PDOConnect::exists('SELECT Schedule_DetailID FROM schedule_detail WHERE UserID = :userId', array('userId' => $this->userId))) {
             $types[] = 'schedule detail records';
         }
         if (PDOConnect::exists('SELECT osr_id FROM oauth_server_registry WHERE osr_usa_id_ref = :userId', array('userId' => $this->userId))) {
             $types[] = 'applications';
         }
         return $types;
     } catch (Exception $e) {
         Debug::Error($e->getMessage());
         throw $e;
     }
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:33,代码来源:userdata.data.class.php


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