1
我有點迷惑怎麼我的查詢轉換:MySQL函數與Kohana的ORM
> SELECT COUNT(`id`) AS `total_logs`, `userlog`.* FROM `user_log` AS
> `userlog` WHERE `user_id` = '31' AND date(`date_created`) =
> '2012-04-30'
到Kohana的ORM 3.1?目前使用即時通訊:
> $isLoged = ORM::factory('Userlog')->select(array('COUNT("id")',
> 'total_logs'))
> ->where('user_id', '=', $user->id)
> ->and_where('Date(date_created)', '=', date('Y-m-d'))
> ->find_all();
不幸上方的一個是給錯誤:(
Database_Exception [1054]:未知列 '日期(DATE_CREATED)' 在 「其中CLA ....