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


PHP Versions::fetchAll方法代码示例

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


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

示例1: getAllVersions

 public static function getAllVersions()
 {
     $versions = array();
     $db = Zend_Registry::get('my_db');
     $v = new Versions($db);
     $result = $v->fetchAll("version_id = " . $id);
     foreach ($result as $row) {
         switch (DB_TYPE) {
             case 'mysql':
                 $version = new Version($row->version_id);
                 break;
             case 'oci8':
                 $version = new Version($row->version_id);
                 break;
         }
         array_push($versions, $version);
     }
     return $versions;
 }
开发者ID:Koulio,项目名称:OpenZIS,代码行数:19,代码来源:Version.php

示例2: getAllVersions

 public static function getAllVersions()
 {
     $versions = array();
     //$db = ZitDBAdapter::getDBAdapter();
     $db = Zend_Registry::get('my_db2');
     $v = new Versions($db);
     $result = $v->fetchAll("active = 1");
     foreach ($result as $row) {
         switch (DB_TYPE) {
             case 'mysql':
                 $version = new Version($row->version_id);
                 break;
             case 'oci8':
                 $version = new Version($row->VERSION_ID);
                 break;
         }
         array_push($versions, $version);
     }
     return $versions;
 }
开发者ID:Koulio,项目名称:OpenZIS,代码行数:20,代码来源:Version.php

示例3: checkVersion

 public static function checkVersion($passVer)
 {
     $db = Zend_Registry::get('my_db');
     $versions = new Versions($db);
     $quoted = $db->quote($passVer);
     $result = $versions->fetchAll("active = 1 and version_num = {$quoted}");
     foreach ($result as $row) {
         switch (DB_TYPE) {
             case 'mysql':
                 if ($passVer == $row->version_num) {
                     return true;
                 }
                 break;
             case 'oci8':
                 if ($passVer == $row->VERSION_NUM) {
                     return true;
                 }
                 break;
         }
     }
     return false;
 }
开发者ID:Koulio,项目名称:OpenZIS,代码行数:22,代码来源:Zit.php

示例4: getZoneVersion

 public static function getZoneVersion()
 {
     $db = Zend_Registry::get('my_db');
     $v = new Versions($db);
     $version_id = $_SESSION['ZONE_VERSION_ID'];
     $result = $v->fetchAll("version_id = {$version_id}");
     switch (DB_TYPE) {
         case 'mysql':
             $_SESSION['VERSION_NAMESPACE'] = $result[0]->version_namespace;
             $_SESSION['ZONE_VERSION'] = $result[0]->version_num;
             $_SESSION['ZONE_VERSION_DIRECTORY'] = $result[0]->version_directory;
             $_SESSION['ZONE_VERSION_SCHEMA_DIR'] = $result[0]->schema_directory;
             break;
         case 'oci8':
             $_SESSION['VERSION_NAMESPACE'] = $result[0]->VERSION_NAMESPACE;
             $_SESSION['ZONE_VERSION'] = $result[0]->VERSION_NUM;
             $_SESSION['ZONE_VERSION_DIRECTORY'] = $result[0]->VERSION_DIRECTORY;
             $_SESSION['ZONE_VERSION_SCHEMA_DIR'] = $result[0]->SCHEMA_DIRECTORY;
             break;
     }
 }
开发者ID:Koulio,项目名称:OpenZIS,代码行数:21,代码来源:Zone.php


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