2010/1/26 John Andersen <[email protected]>
> How do you search for your files that fulfill your criteria?
>
> If you are using a pattern, like "*.txt", then you could just use the
> function glob("*.txt") to return the filenames and dirnames that
> comply with the pattern. The result is an array, which you can
> count :)
>
no, i need something more complex, and i want do it in the more cake-ish way
possible..
I have a model Image that use my datasource, and everything works, but if i
want to know the number of row that will return a find i must have code
like:
count( $this->Image->find('all', array('conditions'=>...)) );
but it's a little bit dirty..
and i wanted to have something like:
$this->Image->find('count', array('conditions'=>...))
but i didn't found documentation on how to implement something like this,
and reading the code, seems that find('count',...) is possible only for sql
based datasource..
> There is no need to worry about the reference to COUNT in MySql, that
> is only if you are using a database.
>
no, i want COUNT in a datasource that is not SQL..
--
pietro
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en