The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
How would I add :
PHP Code:
(So in each post it will work depending on what the title is (which will be someones username). I tried looking for a place to stick it in, but of course the vb code for that page is much more complicated than mine. :ermm: |
#2
|
||||
|
||||
![]()
You should not use mySQL-functions directly - use the class provided by vBulletin.
Furthermore, this would be highly inefficient, as it adds a query for every post. |
#3
|
||||
|
||||
![]()
Okay I'll try to explain what I'm doing so hopefully one of you can give me a push in the right direction.
In the given thread the title input is a dropdown of the member list, then when they post it sets the title as that. I added into the postbit 'Accept' / 'Decline' game buttons, and the accept one takes the post username as winner, and the post title as loser. I need a way for it to recognize the rating//losses (2 fields in user table) of username (posttitle). I have everything working except this. ![]() Would there be a way to do this without running a query per post? |
#4
|
|||
|
|||
![]()
huh ?
i got you all worng are you tring to make like vote systen ? that users will vote who is the winner of the game ? if you want to use the query you provided (NOT RECOMANED) here is the syntax : PHP Code:
user PHP Code:
also its might be able that $thread values will be $threadinfo test on your own risk. |
#5
|
||||
|
||||
![]()
Thanks, its actually per post not thread, so I need to get it while it does the post queries. --anyone?
What's the difference between using the $DB_site-> and regular mysql_query? |
#6
|
|||
|
|||
![]()
form my expriance, if you using more then 1 db table
then its get mixed up - happend to me before also i think its more safe - not sure.. |
#7
|
||||
|
||||
![]()
Would having linked tables help here? And could I add the query into this one (if so, how?). I'm really stuck :disappointed:
PHP Code:
|
#8
|
|||
|
|||
![]() Quote:
try this 1 PHP Code:
i think its should work not sure - not tested. |
#9
|
||||
|
||||
![]()
Thanks I think that is what I needed.
Where it says 'user AS winners ON.....' is winners supposed to be the field name, table name, or what. If someone could finish this off for me I would be very happy. ![]() I need the losers rating and loss count (user.losses and user.rating) where the loser = post.title. |
#10
|
|||
|
|||
![]()
filed name is winners
just add 1 more but i dont think you should combined it in this query as you might get info you dont want. if you want to use the query above then modify it and add the info you need then check if you get the right values, i dont have time to test it so you can do it yourself as i showed you the right way to go if you will have problems please post here again |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|