![]() |
Custom query in postbit
Hey guys in my vb database i have a custom table that contains information about our users. We run a couple game servers and in that table we have the stats of our members.
my question is how do i add some of this info into the postbit? The info can be linked through a custom profile field. so let say the custom table is called stats Select * from stats where playername='$post[fieldXX]'; where would i put the query? how do i display this only if the member has the custom profile field filled in? thanks in advance .. |
|
I know how to display a custom field, that one is easy.... showing info from a custom table i am not sure about.... thanx though
|
I'm not sure I completely understand. Are you looking for the stats info for the user who's post you are seeing? If so, I'm not sure you mean playername='$post[fieldXX]', but instead playername='$post[username]', right? If so, then I think you can hook into the $posts query to grab that info. You'd have to ask for the columns you want (I wouldn't suggest doing stats.*, but instead exactly which fields you want) and also do a JOIN.
|
i do mean playername='$post[fieldXX]' < that contains the name of the player in the game, but yes i do want to show the stats of the person that posted...
the custom table does not contain the users name on the forum, just his playername how do i hook into the post query? |
If you want to hook into the $posts query, then I think you would use the hook location 'showthread_query'. I'm not great at joins (the different types still confuse me), so I can't help with that part.
|
Quote:
|
All times are GMT. The time now is 07:58 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:
|