Howdy dwds,
I got into this query:
SELECT poll.id,topico,count(*) as votos,unix_timestamp(inicio) as i, unix_timestamp(fim) as f
FROM poll_votes,poll
WHERE poll_votes.pollid = poll.id
GROUP BY poll_votes.pollid
UNION
SELECT poll.id,topico,0,unix_timestamp(inicio) as i, unix_timestamp(fim) as f
FROM poll
WHERE id
NOT IN (SELECT poll.id FROM poll,poll_votes WHERE poll_votes.pollid=poll.id)
Now my problem is where to apply the limit $pagstart, $pagend can anyone help me on this ?
Tks in advance