The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Retrieving Data from other Tables
Hi
I've spent two days looking for good examples (mods) on how they would insert/update data from the other customised tables. I can't find any examples good for my vBB 3.6.5. I'm trying to display couple of information in a table in relation to the userid of the user from this board. I've been able to hack it into SMF easily but ain't able to figure out on this board i purchased yet. If possible please guide me to the right examples. Thank you! |
#2
|
||||
|
||||
Are the tables in the same database? If so, use the vBulletin Database Class:
PHP Code:
|
#3
|
|||
|
|||
Quote:
yup. some are. what about the other tables which are not in the same database? secondly, how do i go about fetching these stuffs printed? or making it integrated like, $post[customdata], alike to how we fetch usernames with $post[musername]? im in the midst of reading, http://www.vbulletin.com/docs/html/c...ards_sql_query, thanks |
#4
|
||||
|
||||
All fields in the user table are fetched for each user's posts. For example, if you make a `car` field in the user table, each user's `car` field will be available using $post[car] in the postbit templates.
|
#5
|
|||
|
|||
oh. okay.
just wondering, can the templates found under admincp also be found as a template file? |
#6
|
||||
|
||||
No, templates are stored in the database.
|
#7
|
|||
|
|||
|
#8
|
||||
|
||||
Quote:
select blah from databae1.table1, database2.table2.... You can join tables from different databases, or just use the different database. MySQL does not care which databases tables live in, and accessing different databases has no effect on system performance. |
#9
|
|||
|
|||
Quote:
This helps! Thanks! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|