![]() |
What's wrong with this query?
Whats wrong with this query?
[sql]SELECT * FROM thread WHERE forum.forumid = 13 ORDER BY ID DESC LIMIT 10[/sql] I get this error: Code:
Database error in vBulletin 3.0.6: |
[sql]
SELECT * FROM " . TABLE_PREFIX . "thread WHERE " . TABLE_PREFIX . "forum.forumid = 13 ORDER BY ID DESC LIMIT 10[/sql] |
Lol it is not the only prefix Zach :D He refers to the forum table in the where clause, but forum is not used in the FROM clause. Typical copy&paste&edit error.
[sql]SELECT * FROM " . TABLE_PREFIX . "thread WHERE forumid = 13 ORDER BY ID DESC LIMIT 10[/sql] |
Thanks :).
I don't have time to try this out, but it looks promising.\ Quote:
|
Quote:
|
ay ay
|
Ya goo' ol' pirate!
Still didn't work :(. Query: PHP Code:
Code:
Invalid SQL: SELECT * FROM thread WHERE forumid = 13 ORDER BY ID DESC LIMIT 10 |
Hmm ORDER BY threadid or forumid maybe?
Dont know what order you want. |
I would say "ORDER BY dateline desc" ;)
But if you want the last posts prefer this one ;) PHP Code:
|
Ok, now the DB error is gone.
But, with this code: PHP Code:
|
All times are GMT. The time now is 01:33 PM. |
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:
|