當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。