think tank forum

technology » Advanced SQL Help

 
16 years ago
r1, link
Mathew
Zombie Flesh Eaters
this post has been archived.
sriehl's avatar
16 years ago
r1, link
sriehl
surreal
this post has been archived.
sriehl's avatar
16 years ago
r1, link
sriehl
surreal
this post has been archived.
sriehl's avatar
16 years ago
r1, link
sriehl
surreal
this post has been archived.
 
16 years ago
link
Mathew
Zombie Flesh Eaters
Piss, trying to combine the two datasets into a single array is nonscalar. Who knew a poll was so fucking difficult?
 
16 years ago
link
Mathew
Zombie Flesh Eaters
SELECT poll.PollOption1, poll.PollOption2, poll.PollOption3, poll.PollOption4, poll.PollOption5 from poll where poll.PollId=1
UNION
SELECT(SELECT COUNT(*) FROM votes, poll WHERE votes.VoteValue = poll.PollOption1 AND votes.PollId=poll.PollID),
(SELECT COUNT(*) FROM votes, poll WHERE votes.VoteValue = poll.PollOption2 AND votes.PollId=poll.PollID),
(SELECT COUNT(*) FROM votes, poll WHERE votes.VoteValue = poll.PollOption3 AND votes.PollId=poll.PollID),
(SELECT COUNT(*) FROM votes, poll WHERE votes.VoteValue = poll.PollOption4 AND votes.PollId=poll.PollID),
(SELECT COUNT(*) FROM votes, poll WHERE votes.VoteValue = poll.PollOption5 AND votes.PollId=poll.PollID) from votes where votes.PollId=1
lucas's avatar
16 years ago
link
lucas
i ❤ demo
post schemas and what you want
 
16 years ago
link
Mathew
Zombie Flesh Eaters
It's resolved
Chiken's avatar
16 years ago
r1, link
Chiken
Don't Let Your Walls Down
this post has been archived.
Chiken's avatar
16 years ago
link
Chiken
Don't Let Your Walls Down
mat you rule at posting sql problems then resolving them yourself
 
16 years ago
link
Mathew
Zombie Flesh Eaters
Haha, I always get so flustered when shit doesn't work that I copy and paste things into here hoping someone is online. After I smoke, I usually have a pretty good idea what the problem was. So smoke up kiddies, and your problems with be fixed!
DaGr8Gatzby's avatar
16 years ago
link
DaGr8Gatzby
Drunk by Myself
^ Weed?
Chiken's avatar
16 years ago
link
Chiken
Don't Let Your Walls Down
i think hes talking about cigarettes