On Tuesday 14 May 2002 01:36, Chris Knipe wrote:
> Hmmmm.....
>
> There's no way to do it *without* having to submit two queries to the
> database?  I'm thinking load wise here..... The query (or block), would be
> displayed on every single page in my app - sort of like a shared border
> type thing...
>
> Now, when I have say, 20 pages in the site, 250 concurrent users (or active
> sessions) on the site - which, can happy very quickly - the load on the
> database is going to be -very- high....   So I'm kind of looking for a way
> how I can do this, with as few queries as possible, to put as little stress
> on the database as I can...
>
> But yes, if there is no otherway to do it, then I guess this would have to
> do....

It's just a matter of structuring your code properly. Separate code from HTML. 
Have your regular while-loop reading all the results into an array. If array 
is not empty then print your stuff out, otherwise don't print anything.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
"Virtual" means never knowing where your next byte is coming from.
*/


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

Reply via email to