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