The Arcive of vBulletin Modifications Site. |
|
Simple Stars hack, too many querys being generated... Details »»
|
|||||||||||||||||||||||||||
|
Simple Stars hack, too many querys being generated...
Developer Last Online: Oct 2005
ok, this code generates too many queries, how can I lower it down?
for every usertitle it generates 1 queries, leats say I have 15 replys in 1 thread, that will generate 15 queries... is there a way to lower it down? PHP Code:
Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
what about hard coding instead of making queries to MYSQL?
|
|
#3
|
|||
|
|||
|
well if I do that, its not very user friendly, you would had to edit it by hand to add stars to ranks...
can I loop this somehow without making too many queries? |
|
#4
|
||||
|
||||
|
I think having a performance-friendly code is better than a user-friendly code.
However if you are determined to use queries all you can do is to mimic vb's behaviour of handling user signatures in posts. That is, after making your query and returning your result from MYSQL, store it in an array (cache) and before making any further queries, first check your array if the value already pulled and exist. This will reduce the number of queries.. |
|
#5
|
|||
|
|||
|
thanks, could you give me a code example?
|
![]() |
|
|