投票记录表
生成的sql语句:SELECT wp_posts.ID FROM wp_posts LEFT JOIN wp_wti_like_post on wp_wti_like_post.post_id=wp_posts.ID WHERE 1=1 AND ( ( post_date_gmt > ’2013-11-16 12:17:03′ ) ) AND wp_posts.post_type = ‘post’ AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘private’) ORDER BY wp_wti_like_post.value DESC,wp_posts.post_date DESC LIMIT 5, 5
sql语句应该怎样写呢?
解决办法:
使用wordpress的钩子函数,在发表文章的同时添加一条记录到投票表不就可以了?
直接上代码: