當前位置: 首頁>>代碼示例>>PHP>>正文


PHP LogActions::RowToObject方法代碼示例

本文整理匯總了PHP中LogActions::RowToObject方法的典型用法代碼示例。如果您正苦於以下問題:PHP LogActions::RowToObject方法的具體用法?PHP LogActions::RowToObject怎麽用?PHP LogActions::RowToObject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在LogActions的用法示例。


在下文中一共展示了LogActions::RowToObject方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Search

 function Search($num_rec_per_page = 0, $page = 1)
 {
     $this->MakeSafe();
     // This will store all our extended sql
     $sqlextend = "";
     foreach ($this as $prop => $val) {
         if ($val && $val != date("Y-m-d", strtotime(0))) {
             extendsql($prop, $val, $sqlextend, true);
         }
     }
     $sqlextend .= " ORDER BY Time DESC";
     // Make sure someone didn't do something crazy with the input
     $page = intval($page);
     $num_rec_per_page = intval($num_rec_per_page);
     if ($page && $num_rec_per_page) {
         $start_from = ($page - 1) * $num_rec_per_page;
         $sqlextend .= " LIMIT {$start_from}, {$num_rec_per_page}";
     }
     $sql = "SELECT * FROM fac_GenericLog{$sqlextend};";
     $events = array();
     foreach ($this->query($sql) as $dbRow) {
         $events[] = LogActions::RowToObject($dbRow);
     }
     return $events;
 }
開發者ID:aliyildiz84,項目名稱:openDCIM,代碼行數:25,代碼來源:logging.inc.php

示例2: Search

 function Search($num_rec_per_page = 0, $page = 1)
 {
     $this->MakeSafe();
     // This will store all our extended sql
     $sqlextend = "";
     function findit($prop, $val, &$sql)
     {
         if ($sql) {
             $sql .= " AND {$prop}=\"{$val}\"";
         } else {
             $sql .= " WHERE {$prop} LIKE \"%{$val}%\"";
         }
     }
     foreach ($this as $prop => $val) {
         if ($val && $val != "1969-12-31") {
             findit($prop, $val, $sqlextend);
         }
     }
     $sqlextend .= " ORDER BY Time DESC";
     // Make sure someone didn't do something crazy with the input
     $page = intval($page);
     $num_rec_per_page = intval($num_rec_per_page);
     if ($page && $num_rec_per_page) {
         $start_from = ($page - 1) * $num_rec_per_page;
         $sqlextend .= " LIMIT {$start_from}, {$num_rec_per_page}";
     }
     $sql = "SELECT * FROM fac_GenericLog{$sqlextend};";
     $events = array();
     foreach ($this->query($sql) as $dbRow) {
         $events[] = LogActions::RowToObject($dbRow);
     }
     return $events;
 }
開發者ID:spezialist1,項目名稱:openDCIM,代碼行數:33,代碼來源:logging.inc.php


注:本文中的LogActions::RowToObject方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。