|
Posted by Andy Jeffries on 03/24/06 12:48
On Thu, 23 Mar 2006 12:21:08 -0500, John Murtari wrote:
> 4. Just about FORGET treating each person as some type
> of OBJECT so that everytime you want to put up info on a person you have
> to do an individual query. If you are showing search results on 50
> people, go get all the information at once that you will need on each of
> them.
I actually disagree, there's nothing wrong with having an object for a
person, but I agree about not doing simple queries for every lookup.
My classes all implement a selectIDs($array) method that you call once and
it then gets all of those IDs and caches them so when I call my
findID($ID) method it just retrieves it from the cache.
Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
[Back to original message]
|