The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
is this code efficient?
PHP Code:
|
#2
|
||||
|
||||
![]()
You really need to get those two queries within the while loop removed.
|
#3
|
||||
|
||||
![]()
Any suggestions on an alternative?
|
#4
|
||||
|
||||
![]()
Whats the $projects query? Its possible it can be integrated with that.
|
#5
|
||||
|
||||
![]()
projects is pulling the text out one by one
where as as i have the second table is the project_rate table where i store each rating the projct text gets so later as i display it, i'm hoping to display the number of ratings each project i had on the page project Code:
projectid text timestamp userid Code:
rateid projectid userid timestamp rate kinda like where on the index of TS3 you got the number of comments displayed along with each of your news items. |
#6
|
||||
|
||||
![]()
heres the exact query
PHP Code:
|
#7
|
||||
|
||||
![]()
why should left joins be bad?
but here, it's suggest a inner join ![]() PHP Code:
|
#8
|
||||
|
||||
![]()
dunno just read in another thread that left joins would cripple any highly active server.
|
#9
|
||||
|
||||
![]()
nah, it depends on which tables you join.
for example thread and post table shouldn't be joined, as these are bother very big ones. on the other hand the session table and the user table could always be joined, as the session table is normally a very small one. also it's always better to join instead of looping a query a lot ![]() |
#10
|
||||
|
||||
![]()
oh ok, thanks for explaining that and i'm just gonna try out the code now
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|