The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
im having some trouble with this
ive got polls to show on a non-vb page, and the results if the person has voted now i just want polls from 1 specific forum (forum 4) to display on the page this is my select statement code: Code:
$sql = 'SELECT poll.*, thread.* FROM poll AS poll, thread AS thread
WHERE thread.forumid = 4
ORDER BY dateline DESC
LIMIT 1';
im not very good a doing mysql joins/left joins right now....little help? |
|
#2
|
|||
|
|||
|
[sql]SELECT poll.*, thread.*
FROM thread AS thread LEFT JOIN poll AS poll ON (poll.pollid = thread.pollid) WHERE thread.forumid = 4 ORDER BY thread.dateline DESC LIMIT 1[/sql] |
|
#3
|
|||
|
|||
|
perfect thanks!
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|