Hello friends,
I'm planning to make an online/offline users and members surfing my forums in a moment, just like any other forums. Now, what I want to do exactly is to count the whole poeple surfing the forum wether they were registered or guests, and members alone and guests alone. I thought of making three queries. The first counts the whole number, the second counts the members, and the third counts the guests. It's working fine but taking into consideration that I have more than 20 queries in the index page that will add three more queries to the 20 to be 23 which are too many I guess. My question is:
Is it to much to have that number of queries in a page? and is there any other way to reduce this number of queries by using other techniques???
23 is definitely high. You really won't need any more than two queries at most to show who's online. Possibly one for the members, and one for the guests. But then you can just add these two numbers together in PHP to get the total.
You are right Andrew275. Now we got rid of one query, what shall I do with the rest??? Don't you think 20 queries for one page is too much??? Usually they are less than 12 in IPB, how do they do that???
Bookmarks