Guest User

Untitled

a guest
Jul 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. $count_user=Doctrine::getTable('sfGuardUser')->count();
  2.  
  3. $first_day_of_current_year = date('Y-m-d H:i:s', strtotime('1 january'));
  4.  
  5. $q = Doctrine_Query::create()
  6. ->select('COUNT(u.*)')
  7. ->from('sfGuardUser u')
  8. ->where('u.created_at > ?', $first_day_of_current_year);
  9. $total = $q->execute(array(), Doctrine_Core::HYDRATE_NONE);
  10. $total = $total[0][0];
Add Comment
Please, Sign In to add comment