Skip to content

Instantly share code, notes, and snippets.

@fdeitelhoff
Created August 11, 2013 14:21
Show Gist options
  • Save fdeitelhoff/6205094 to your computer and use it in GitHub Desktop.
Save fdeitelhoff/6205094 to your computer and use it in GitHub Desktop.
Ziehung des Gewinners für die Herbstcampus 2013-Ticketverlosung.
SELECT
distinct comment_author, comment_author_email
FROM
wp_comments
INNER JOIN
wp_posts
ON
comment_post_ID = id
WHERE
post_title = 'Herbstcampus 2013: Teilnahme und Ticketverlosung'
AND
comment_approved = 1
AND
user_id = 0
AND
comment_date
BETWEEN
'2013-08-04 12:00:00'
AND
'2013-08-11 12:00:00'
ORDER BY
RAND()
LIMIT
1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment