Re: Help setting custom validation counting rule

2008-10-03 Thread Mathew
$count = $this->find('count',array('conditions'=> $data,'recursive'=>-1)); should be $count = $this->find('count',array('conditions'=>array('state'=> $data),'recursive'=>-1)); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Help setting custom validation counting rule

2008-10-03 Thread 3lancer.eu
Hi again, And what is the problem here, what query is generated? Regards, Piotr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsu

Re: Help setting custom validation counting rule

2008-10-02 Thread mig_akira
('count', array('conditions' => $data, >> 'recursive' => -1) ); >>         return $contagem < $limit; >>         } > > What is $contagem doing here then? > > Regards, > Piotr > > > > -- View this message in context:

Re: Help setting custom validation counting rule

2008-10-02 Thread 3lancer.eu
Hi, >   function limitState($data, $limit) { >         $count = $this->find('count', array('conditions' => $data, > 'recursive' => -1) ); >         return $contagem < $limit; >         } What is $contagem doing here then? Regards, Piotr --~--~-~--~~~---~--~~ You

Re: Help setting custom validation counting rule

2008-10-02 Thread mig_akira
ate is stored in a varchar field, with only the 2 first letters of the > state ('CA', for example). So I must count how many people from 'state' -> > 'CA' there is and then must set up a custom rule that prevents people from > submitting to the site when