Hi there dwd's
(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 and '$datactual'>inicio and '$datactual'>fim
GROUP BY poll_votes.pollid)
UNION
(SELECT poll.id,topico,0,unix_timestamp(inicio) as i, unix_timestamp(fim) as f
FROM poll
WHERE '$datactual'>inicio and '$datactual'>fim and id
NOT IN
(SELECT poll.id
FROM poll,poll_votes
WHERE poll_votes.pollid=poll.id and '$datactual'>inicio and '$datactual'>fim))
LIMIT $pagstart, $max
I've got this query and it works fine in a beta version of mysql, in standart nop, since it doesnt support NOT IN syntax and subqueries, can anyone helpme with this? Any other ideias?
Tks in advance