Bin will be removed on June 1, 2014 in favor of http://gist.github.com. Please save all your pastes before then. So long, and thanks for all the fish!×

conditions

View Paste
  1. $conditions = array('Lead.user_id' => NULL, 'Lead.lastuser_id !=' => $uid );
  2. // I am having iss...
View Paste
  1. //BASE Paginate Conditions
  2. $conditions = array(
  3.     'Listing.active' => '1',
  4. );
  5.  
  6. // call wit...
base pagination 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