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


PHP messages::where方法代码示例

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


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

示例1: mapmessage

 public function mapmessage($id)
 {
     $today = date("Y-m-d H:i:s");
     $fiveday = date("Y-m-d H:i:s", strtotime('-5 days'));
     $tenday = date("Y-m-d H:i:s", strtotime('-10 days'));
     $fifday = date("Y-m-d H:i:s", strtotime('-15 days'));
     $twentyday = date("Y-m-d H:i:s", strtotime('-20 days'));
     $tfiveday = date("Y-m-d H:i:s", strtotime('-25 days'));
     $thurtyday = date("Y-m-d H:i:s", strtotime('-30 days'));
     $thurtyfiveday = date("Y-m-d H:i:s", strtotime('-35 days'));
     //$jsonVariable;
     $q = messages::where('agent_id', '=', $id)->where('type', '=', '1')->where('date', '>=', $fiveday)->where('date', '<=', $today)->count();
     $w = messages::where('agent_id', '=', $id)->where('type', '=', '1')->where('date', '>=', $tenday)->where('date', '<=', $fiveday)->count();
     $e = messages::where('agent_id', '=', $id)->where('type', '=', '1')->where('date', '>=', $fifday)->where('date', '<=', $tenday)->count();
     $r = messages::where('agent_id', '=', $id)->where('type', '=', '1')->where('date', '>=', $twentyday)->where('date', '<=', $fifday)->count();
     $t = messages::where('agent_id', '=', $id)->where('type', '=', '1')->where('date', '>=', $tfiveday)->where('date', '<=', $twentyday)->count();
     $y = messages::where('agent_id', '=', $id)->where('type', '=', '1')->where('date', '>=', $thurtyday)->where('date', '<=', $tfiveday)->count();
     $u = messages::where('agent_id', '=', $id)->where('type', '=', '1')->where('date', '>=', $thurtyfiveday)->where('date', '<=', $thurtyday)->count();
     $today = $q;
     $fiveday = $w;
     $tenday = $e;
     $fifday = $r;
     $twentyday = $t;
     $tfiveday = $y;
     $thurtyfiveday = $u;
     $mapmessage = '[1, ' . $today . '], [2, ' . $fiveday . '], [3, ' . $tenday . '], [4, ' . $fifday . '], [5, ' . $twentyday . '], [6, ' . $tfiveday . '], [7, ' . $thurtyfiveday . ']';
     $jsonVariable['mapmessage'] = $mapmessage;
     return Response::json($jsonVariable);
 }
开发者ID:amsule,项目名称:controllers,代码行数:29,代码来源:DashBoardAccess.php

示例2: selectmessages

 public function selectmessages()
 {
     $agent_id = Input::get('data.agent_id');
     $type = Input::get('data.type');
     $messages = messages::where('agent_id', '=', $agent_id)->where('type', '=', $type)->orderby('msg_id', 'Desc')->get();
     return $messages;
 }
开发者ID:amsule,项目名称:controllers,代码行数:7,代码来源:DBajax.php


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