folgendes möchte ich machen:
Die Themen, die eine Umfrage enthalten, bei denen der User noch nicht abgestimmt hat, sollen selektiert werden.
Ich mache dies im Moment so:
Erstmal gucken wo er schon abgestimmt hat
Code: Alles auswählen
SELECT p.topic_id
FROM phpbb3_poll_votes p
LEFT JOIN phpbb3_topics t
ON t.topic_id = p.topic_id
WHERE vote_user_id = {USER_ID}
AND t.topic_time > 1210412205
GROUP BY topic_id
LIMIT 5
Code: Alles auswählen
SELECT poll_title,topic_id,forum_id
FROM phpbb3_topics
WHERE topic_id NOT IN ({IDS})
AND poll_title != ''
AND topic_time > 1210412205
LIMIT 5
S.