- How do I take a mysql query and print the results on a cakephp page
- $users = $this->User->find('all', array('order'=> array('User.rating' => 'desc'), 'conditions'=>array('User.rating >' => '50')));
- $this->set('users', $users);
- <?php
- foreach ($users as $user):
- echo $this->Html->link("View User", array('controller' => 'users', 'action' => 'view', $user['id']));
- endforeach;
- ?>