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


PHP QDatabaseResultBase类代码示例

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


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

示例1: InstantiateDbResult

 /**
  * Instantiate an array of Items from a Database Result
  * @param DatabaseResultBase $objDbResult
  * @return Item[]
  */
 public static function InstantiateDbResult(QDatabaseResultBase $objDbResult)
 {
     $objToReturn = array();
     // If blank resultset, then return empty array
     if (!$objDbResult) {
         return $objToReturn;
     }
     // Load up the return array with each row
     while ($objDbRow = $objDbResult->GetNextRow()) {
         array_push($objToReturn, Item::InstantiateDbRow($objDbRow));
     }
     return $objToReturn;
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:18,代码来源:Item.class.php

示例2: InstantiateDbResult

 /**
  * Instantiate an array of Librarydetailses from a Database Result
  * @param DatabaseResultBase $objDbResult
  * @param string $strExpandAsArrayNodes
  * @param string[] $strColumnAliasArray
  * @return Librarydetails[]
  */
 public static function InstantiateDbResult(QDatabaseResultBase $objDbResult, $strExpandAsArrayNodes = null, $strColumnAliasArray = null)
 {
     $objToReturn = array();
     if (!$strColumnAliasArray) {
         $strColumnAliasArray = array();
     }
     // If blank resultset, then return empty array
     if (!$objDbResult) {
         return $objToReturn;
     }
     // Load up the return array with each row
     if ($strExpandAsArrayNodes) {
         $objToReturn = array();
         while ($objDbRow = $objDbResult->GetNextRow()) {
             $objItem = Librarydetails::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, $objToReturn, $strColumnAliasArray);
             if ($objItem) {
                 $objToReturn[] = $objItem;
             }
         }
     } else {
         while ($objDbRow = $objDbResult->GetNextRow()) {
             $objToReturn[] = Librarydetails::InstantiateDbRow($objDbRow, null, null, null, $strColumnAliasArray);
         }
     }
     return $objToReturn;
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:33,代码来源:LibrarydetailsGen.class.php

示例3: InstantiateCursor

 /**
  * Instantiate a single SignupPayment object from a query cursor (e.g. a DB ResultSet).
  * Cursor is automatically moved to the "next row" of the result set.
  * Will return NULL if no cursor or if the cursor has no more rows in the resultset.
  * @param QDatabaseResultBase $objDbResult cursor resource
  * @return SignupPayment next row resulting from the query
  */
 public static function InstantiateCursor(QDatabaseResultBase $objDbResult)
 {
     // If blank resultset, then return empty result
     if (!$objDbResult) {
         return null;
     }
     // If empty resultset, then return empty result
     $objDbRow = $objDbResult->GetNextRow();
     if (!$objDbRow) {
         return null;
     }
     // We need the Column Aliases
     $strColumnAliasArray = $objDbResult->QueryBuilder->ColumnAliasArray;
     if (!$strColumnAliasArray) {
         $strColumnAliasArray = array();
     }
     // Pull Expansions (if applicable)
     $strExpandAsArrayNodes = $objDbResult->QueryBuilder->ExpandAsArrayNodes;
     // Load up the return result with a row and return it
     return SignupPayment::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, null, $strColumnAliasArray);
 }
开发者ID:alcf,项目名称:chms,代码行数:28,代码来源:SignupPaymentGen.class.php

示例4: InstantiateDbResult

 /**
  * Instantiate an array of InventoryModels from a Database Result
  * @param DatabaseResultBase $objDbResult
  * @return InventoryModel[]
  */
 public static function InstantiateDbResult(QDatabaseResultBase $objDbResult, $strExpandAsArrayNodes = null)
 {
     $objToReturn = array();
     // If blank resultset, then return empty array
     if (!$objDbResult) {
         return $objToReturn;
     }
     // Load up the return array with each row
     if ($strExpandAsArrayNodes) {
         $objLastRowItem = null;
         while ($objDbRow = $objDbResult->GetNextRow()) {
             $objItem = InventoryModel::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, $objLastRowItem);
             if ($objItem) {
                 array_push($objToReturn, $objItem);
                 $objLastRowItem = $objItem;
             }
         }
     } else {
         while ($objDbRow = $objDbResult->GetNextRow()) {
             array_push($objToReturn, InventoryModel::InstantiateDbRow($objDbRow));
         }
     }
     return $objToReturn;
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:29,代码来源:InventoryModelGen.class.php


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