The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
I realised my mistake after I posted.
I need to do a second query to get the thread text, but without knowing the names of everything I'm struggling. I've searched through Google and through the owners area without any luck in the search for documentation. Any online source for the MySQL table layout? --------------- Added [DATE]1213317483[/DATE] at [TIME]1213317483[/TIME] --------------- As always, as soon as you ask for something, you find it. I have it all working fine now. Thanks for all your help. |
#12
|
|||
|
|||
Hey
It would be great if you post the code here. I've been looking for this for a long time! Thanks, Marin |
#13
|
|||
|
|||
The code is below. I'm sure there are much more elegant methods, but it works:
Code:
$result = mysql_query("SELECT postid, username, userid, dateline, pagetext, threadid FROM post WHERE visible = 1 ORDER BY dateline DESC LIMIT 10") or die('I cannot select from the database because: ' . mysql_error()); while($rows = mysql_fetch_assoc($result)) { $result_thread = mysql_query("SELECT title,forumid FROM thread WHERE threadid='" . $rows['threadid'] . "'") or die('I cannot select from the database because: ' . mysql_error()); $rows_thread = mysql_fetch_assoc($result_thread); $result_forum = mysql_query("SELECT title FROM forum WHERE forumid='" . $rows_thread['forumid'] . "'") or die('I cannot select from the database because: ' . mysql_error()); $rows_forum = mysql_fetch_assoc($result_forum); // basic variables required to output latest posts print $rows_thread['forumid'], $rows_forum['title'], $rows['threadid'], $rows_thread['title'], $rows['pagetext'], $rows['username'], $rows['dateline']; } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|