Re: Getting total results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joseph Crawford wrote:
Actually i thought keeping all the data in one query stored in a class
was more efficient than a database connection with each page change,
however if i am wrong please explain why more database connections is
less efficient...

Your class isn't persisting over pages, though, is it? If so, how are you doing it? A singleton class is good for multiple calls to it on the same page / within the same script. It doesn't persist across pages unless you're doing something else with it. Even if you are, serializing/unserializing (I assume) a class with 100 data units in it may not be more efficient than connecting to the database and just retrieving 10 data units at a time...


--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux