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 :)
There is no need to worry about the reference to COUNT in MySql, that
is only if you are using a database.
Enjoy,
John
On Jan 26, 7:32 pm, fain182 <fain...@gmail.com> wrote:
> no one ever tried to write a datasource with count included and not
> for an SQL database?
>
> 2010/1/21 fain182 <fain...@gmail.com>:
>
>
>
> > Hello,
> > I wrote a little datasource that i need to browse the filesystem..
> > find('all'), find('first') works without any problem, but I tried to
> > use find('count') and I discovered that I need to implement
> > calculate() on my datasource..
> > but calculate documentation says that "Returns an SQL calculation,
> > i.e. COUNT() or MAX()" !?
> > find(count) can be used only by SQL based datasource??
>
> > or I am missing something?
> > thank you
>
> > PS: it would be cool add some information about this in the cookbook too..
>
> > --
> > pietro
>
> --
> 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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment