![]() |
Quote:
Great hack! |
Quote:
|
Quote:
|
Quote:
Is it true what Teck said? |
Replace:
PHP Code:
PHP Code:
|
Thanks for this very quick reply :)
|
Quote:
If you allow me, I will explain what is wrong with the code. The query will perform a full scan from ALL forums and ALL threads. At this precise moment, the MySQL % will raise to the sky... for an instance the server will be suffocated with the flood of information it has to compile, in order to display the results, and that?s only for one person... imagine what will happen when 500 users will visit in the same time your front page. A good rule to keep in mind for coders is: never perform full table scans. If you have a very small forum with 200-300 posts, that will not really count, since your database is very small, but what do you do with huge forums who have 1 million posts? Unfortunatelly, the 5 threads limit does not reduce the query scan at all, it will perform it, then grab only the latest 5 results. What I recommend you to do is this: put a time/date limit in the query. In this way, instead of scanning the hole forum/thread tables, you select a very small portion of it. The result is obvious, a very small database/server usage... :) Regards, Floren. |
Quote:
|
Create a new phrase called latest_threads in the GLOBAL group with the following content:
i dont understand where create the phrase....can u explain me better pls? and $thread['views'] = vb_number_format($thread['views']); doesnt works and show always 0 :ermm: |
Quote:
|
All times are GMT. The time now is 02:09 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|