conditions

View Paste
  1. // In app/controllers/sample_controller.php
  2.     public function pc(){
  3.         $this->autoRender...
sample converting posted form data to conditions suitable for find()
View Paste
  1. $this->Employee->Requirement->bindModel(array('hasOne'=>array('CostunitsRequirement')));
  2. $requir...
View Paste
  1.     function returnAclassDate( $id = false, $mode = 'next' )
  2.     {
  3.         if(! (int) $id || ! in_array(str...
This method should return the date of a class within a specified course where the $mode tells the...
View Paste
  1.     function beforeFind($queryData){
  2.         if(isset($this->_schema['lang_code'])){
  3.             if(!empty($query...
Insert into your appModel if you have a field like lang_code in several DB tables and you would l...
View Paste
  1.     function index() {
  2.  
  3.         $conditions = array('Card.user_id = '.$user['User']['id']);
  4.         $paginati...
Pagination with conditions in cakephp 1.2