Paolo, actually maybe it's more simple if you paginate. I am sure you
are not going to show 5000 houses on a single page .. So if you limit
your number of houses per page you should not have memory problem.
If you show 25 houses par page, maybe you will grab 25 times the same
state/region but that should not reach the memory limit.
Check the $limit and $page of findAll.
Are you using cake 1.2 ?

On Oct 27, 3:11 am, Paolo <[EMAIL PROTECTED]> wrote:
> I linked them through an ID, but I need to display the name of the
> cities/regions, so I need to "join" the id in the house row with the
> name in the city table
> to francky06l , what do you mean cache? How can I use caching in cake?
>
> On 26 Ott, 18:03, "J. Eckert" <[EMAIL PROTECTED]> wrote:
>
> > > In house index action I use findAll in all tables in order to show the
>
> > Why are you using findAll on ALL tables?
>
> > If your Models are corretly associated
> > (
> >   house belongsTo city
> >   city belongsTo region
> >   region belongsTo State
> > )
> > you shouldn't get more information than you need if you do a
>
> > $this->House->findAll(....)
>
> > For every house you will get 1 city, 1 region, 1 state...
>
> > On Oct 26, 12:01 pm, Paolo <[EMAIL PROTECTED]> wrote:
>
> > > Hi all!
> > > I have a problem using cake. I have a table that is linked to it's
> > > geographical location
> > > (i.e. house -> ... city_id
> > > city -> ... region_id
> > > region -> -... state_id)
> > > city, region and state in the list of houses. The problem is that I
> > > have 8000 cities so i get out of memory error. Is there another way to
> > > associate the id to the name of the city (region and state)?
>
> > > Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to