$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
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
('count', array('conditions' => $data,
>> 'recursive' => -1) );
>> return $contagem < $limit;
>> }
>
> What is $contagem doing here then?
>
> Regards,
> Piotr
> >
>
>
--
View this message in context:
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
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