• Resolved Loni2Shoes

    (@loni2shoes)


    When using the gamipress_earnings shortcode and specifying a points_types attribute, the query generated is automatically including a blank (”) points_type, which means inapplicable results are returned. In other words, while my query should look like this:

    SELECT SQL_CALC_FOUND_ROWS prefix_gamipress_user_earnings.user_earning_id
    FROM prefix_gamipress_user_earnings
    WHERE 1=1 AND prefix_gamipress_user_earnings.user_id = 100
    AND prefix_gamipress_user_earnings.points_type IN ( 'super-points' )

    it instead looks like this:

    SELECT SQL_CALC_FOUND_ROWS prefix_gamipress_user_earnings.user_earning_id
    FROM prefix_gamipress_user_earnings
    WHERE 1=1 AND prefix_gamipress_user_earnings.user_id = 100
    AND prefix_gamipress_user_earnings.points_type IN ( 'super-points', '' )
Viewing 1 replies (of 1 total)
  • Thread Starter Loni2Shoes

    (@loni2shoes)

    Solved it! The empty string appears to be appended when you don’t set achievements_without_points to no (it’s yes by default).

Viewing 1 replies (of 1 total)
  • The topic ‘gamipress_earnings and points_type’ is closed to new replies.