![]() |
COUNT pollvotes and display
Code:
$vote = $db->query_read("SELECT forum.forumid, forum.title, forum.parentid, poll.pollid, poll.voters, pollvote.voteoption The above code sort of works but it stops before it's pulled all the data, I think this has something to do with the while loop running it's course before it's retrieved all the info. Example of what 'm trying to achieve --------------------------------------------------- Forum 1 (45 Vote Total) Forum 2 (0 Vote Total) Forum 3 (22 Vote Total) Forum 4 (14 Vote Total) I hope that's clear enough, and thanks for looking. |
[sql]
LEFT JOIN " . TABLE_PREFIX . "poll AS poll ON(poll.pollid = forum.forumid) [/sql] Should pollid be forumid? Maybe you could use the COUNT(xxxx) MySQL function somehow? (Check google for information on it) |
yes the pollid will match the forumid, which should make it easier to pull the correct data ;)
--------------- Added [DATE]1215446827[/DATE] at [TIME]1215446827[/TIME] --------------- tried the COUNT method, still no joy :( --------------- Added [DATE]1215446986[/DATE] at [TIME]1215446986[/TIME] --------------- the closest I've come is below, Code:
$num=1; |
sorted, please close.
|
Maybe post your final query so someone else searching can find it? :rolleyes:
|
All times are GMT. The time now is 01:06 AM. |
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:
|