The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Currently it only extracts data from the first thread in a specific forum. I want it to call the first 5 threads instead.
Current code: $latesta = $db->query_first('SELECT title,threadid,views,replycount,postusername,datel ine FROM ' . TABLE_PREFIX . 'thread WHERE 1 AND forumid = 28 ORDER BY dateline DESC LIMIT 0 , 1'); Rewriting it to this: $latesta = $db->query('SELECT title,threadid,views,replycount,postusername,datel ine FROM ' . TABLE_PREFIX . 'thread WHERE forumid = 28 ORDER BY dateline DESC LIMIT 0 , 5'); Returns a mySQL error so I'm stuck. Any help is appreciated, thanks. |
#2
|
||||
|
||||
![]()
What's the MYSQL error?
|
#3
|
|||
|
|||
![]()
Database error in vBulletin 3.6.0:
Invalid SQL: That's all it says, after displaying this: Quote:
|
#4
|
||||
|
||||
![]()
View the HTML source so you can see the hidden error message.
|
#5
|
|||
|
|||
![]()
I duplicated the error and left it online for you to check out. I really appreciate the help!
http://www.pokerealm.net/news/ I also took out the redirect script in the iFrame incase you wanted to view that as well. http://www.pokerealm.net/announceframe.php Here are .txts of the iframe source and the php source. PHP code probably isn't optimized, I can fix that later. http://www.pokerealm.net/zero/login_inc2.txt http://www.pokerealm.net/zero/announceframe.txt Edit: I just noticed (by looking at the iframe by itself - hadn't tried that) that the SQL error is from the SECOND query I am running down there. However, I will just let you take a look at the whole shebang so hopefully I can get better advice on how to write this hack as a whole. (If you end up writing it, feel free to release it as a MOD or something ![]() I want to display the title/text/replies/views of the latest 5 threads from my news forum. Edit2: Nevermind. It's ugly but I just set up a separate query for pulling each thread so 5 news articles = 10 queries. I can live with that I suppose. http://www.pokerealm.net is what I ended up with. Man, someone should really rewrite this 'correctly' and release it as a MOD - as well as that vbulletin 'sidebar'. Those would be MotM easy! |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|