![]() |
Probobly simle question.
Hi dudes.
I have a simple question ( I hope ) I have added a new "User Profile Field" called Nick. Now i want to use it to find a rank in my Db. The DB looks like this: Table Name: stats_individual Rows: name , rank What i need is to display the "rank" under "posts" in the postbit using the "nick" the user provided in the CP. I have tried to edit the postbit but i cant get it to work :-( My test: Location: $post[field2] Posts: $post[posts] Rank: SELECT rank FROM stats_individual WHERE name=$post[field5] That dident work ( Not that i actualy belived that it would ) Any ideas? /DonLKSAB |
Woa what you said is confusing :-p
SELECT rank FROM stats_individual WHERE name=$post[field5] Will not work in the post biut :p You may want to try putting in the showthread.php PHP Code:
I am still bit confused on what you want, but try that. Also then in the postbit put Rank: $ranking[rank] |
@Arunan: Thank would create an extra query for each post!!
It would work you are right, but one more query per post is not good ;) @Don: open showthread.php find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Well both look good.
But non of them work :-( I dont get any errors or any indication that something is wrong. It simply dont display anything. /DonLKSAB |
Quote:
That above should work. |
Ahh.
There were 2 places in Showtread to change. One in the begining and one in the end :-) Now it works. Thanks dudes. /DonLKSAB |
:)
you're welcome :) @Arunan: :), as long as i saw where you wanted to put it, and could give a better advice it's ok :) I remember my own first small hacks to showthread.php, without the microstats hack i always thought all is good ^^ |
Hehe, thanks Xenon :) You have been teaching me new things alot, and they are coming in handy alot too. For that I thank you!
Whenever you need anything...anything at all, my pm box/email inbox are open :) |
:)
you're always welcome :) hmm, yeah i need time, but i'm sure you can't send it to me right? ;) well, maybe i'll find something in future. it's enough to see you've learned a lot so you could help others :) |
All times are GMT. The time now is 11:16 AM. |
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:
|