随笔分类 -  cakephp

摘要:Which is the advantage of using CakePHP Console / Shell for programmed tasks ? 查看 "原文" 最近用到了cakephp中的shell,但是不知道为什么要用shell,所以到google了一下,找到了一份比较满意的答案,在 阅读全文
posted @ 2016-11-23 16:51 昼伏夜奔 阅读(400) 评论(0) 推荐(0)
摘要:对于find('count',array('group'=>'user_id')); Model.php中这样描述: 在cakephp测试用例中,有这样的描述: $expected 和 $result 的结果是一样的。那么使用count,group统计也是可行的。 使用find('count',ar 阅读全文
posted @ 2016-09-23 10:03 昼伏夜奔 阅读(970) 评论(0) 推荐(0)
摘要:1 out("Processing...\n"); 10 $collection = new ComponentCollection(); 11 $this->MTurk = new MTurkComponent($collection); 12 $controller = new Controller(); 13 $this-... 阅读全文
posted @ 2016-08-24 10:45 昼伏夜奔 阅读(252) 评论(0) 推荐(0)
摘要:Cakephp在Controller中查询语句一般是: $this->Model->find(); 那么这条语句对应的sql语句是什么呢? 可以通过下面方法显示: 1. $dbo = ConnectionManager::getDataSource('default'); $logs = $dbo- 阅读全文
posted @ 2016-05-19 18:22 昼伏夜奔 阅读(1289) 评论(0) 推荐(0)