当前位置: 首页>>代码示例>>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;未经允许,请勿转载。