Support » Plugin: WP likes » SQL query don't work

  • Hi,
    I had to change the query to properly operate the module.

    This is my new query :

    on plugins/wp-likes/likes.php:506

    From:
    SELECT post_id, p.post_title AS title,count(post_id) AS num FROM $wpdb->likes,$wpdb->posts as p WHERE p.id=post_id GROUP BY post_id HAVING num>1 ORDER BY num DESC LIMIT 5

    –>
    To:
    SELECT likes.post_id, post.post_title AS title,count(likes.post_id) AS num FROM $wpdb->likes likes,$wpdb->posts post WHERE post.id=likes.post_id GROUP BY likes.post_id ORDER BY num DESC LIMIT 5

  • The topic ‘SQL query don't work’ is closed to new replies.