The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I am somewhat of a php newbie especially when it comes to connecting to a mysql database and doing queries than using the information from the queries.
Here's what I have setup so far. The php file looks likes this. PHP Code:
Here's what my vars.php file looks like PHP Code:
Anyways what I don't really know how setup two mysql queries and than use the information in main.inc It seems like the information I need is divided into two tables the thread table which has the forumid field (I only want to grab posts from forumid = 11), title and postusername fields. Than there's the post table which I am guessing I would need to grab stuff from threadid and pagetext fields. Essentially what I want to do is grab the most recent post in my news forum which has the id of 11 and grab a short excerpt from it. than for the other query how would I grab the titles of the most recent 10 posts in the same forum just minus the most recent since I already grabbed that. Thanks in advanced for any help. |
#2
|
|||
|
|||
![]()
The easiest way to use vBulletin tables would be to include global.php at the start of your script. No need to worry about setting up a database connection anymore then:
PHP Code:
PHP Code:
|
#3
|
|||
|
|||
![]()
I am getting a parse error on line twelve.
PHP Code:
*edit* not sure why those plus signs are being put in there, they aren't part of the file it seems that the php vbcode is adding them for some reason. |
#4
|
||||
|
||||
![]()
I hope you have something other than ...process... there?
|
#5
|
|||
|
|||
![]()
Ok, i have pretty much the same thing as him, im having problems figuring out how to parse the thread contents itself though, heres what i have.. modified w/out the file calls from vb. I want to be able to parse the username, title, and content of the post. But I cant figured out how to do it, any help would be greatly appreciated
PHP Code:
|
#6
|
|||
|
|||
![]()
And what happens? You get an error, nothing is selected?
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|