You are here: Re: best approach to caching DB results « PHP Programming Language « IT news, forums, messages
Re: best approach to caching DB results

Posted by flowover on 01/05/08 13:13

On Jan 4, 6:46 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Rowan wrote:
>
> > What is the best approach to caching database results. example say i'm
> > doign an update on several entries which i've loaded into an array. I
> > want to allow the user to click through and up date each array entry
> > then dump everythign to the db once they are done...
>
> Don't bother. It's normally cheaper to just keep track of the ID's and
> fetch the results again.
>
> You should be fetching them again before updating anyway, and verifying
> the rows haven't changed (i.e. two people updating at the same time).
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================
If you're writing the site to scale then yes, plan for multi users
being in there changing. If the site is just an administration
backend that you know isn't going to have more than one person making
changes at a time, stuff that array in a session. This requires
either a big ugly key in your URL or a cookie though, but imo is the
best way to cache data between requests.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация