Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT
$votes = $this->find('all', array( 'contain'=>array('Artist','Vote'), 'fields'=>array('Media.artist_id','COUNT(*) AS votes'), 'conditions'=> array( "Vote.created BETWEEN '" . $start . "' AND '" . $end . "'", 'Artist.department_id' => $department ), 'group'=>'Media.artist_id', 'order'=>array('votes DESC'), ) );
SELECT `Media`.`artist_id`, COUNT(*) AS votes, `Media`.`id` FROM `media` AS `Media` LEFT JOIN `artists` AS `Artist` ON (`Media`.`artist_id` = `Artist`.`id`) WHERE `Vote`.`created` BETWEEN '2010-11-08 00:00:00' AND '2010-11-14 23:59:59' AND `Artist`.`department_id` = 1 GROUP BY `Media`.`artist_id` ORDER BY `votes` DESC
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.