Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1.         $g = $this->User->Download->find('first', array(
  2.             'fields'        => array('COUNT(Download.id) AS today'),
  3.             'conditions'    =>
  4.                 array(
  5.                     'Download.user_id' => $this->Auth->user('id'),
  6.                     'DATE_SUB(CURDATE(), INTERVAL 24 HOUR) >= Download.created'
  7.                 )
  8.         ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement