Title: Errors retrieving user leaderboard position with shortcode
Last modified: July 17, 2021

---

# Errors retrieving user leaderboard position with shortcode

 *  Resolved [caitlinelysey](https://wordpress.org/support/users/caitlinelysey/)
 * (@caitlinelysey)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/errors-retrieving-user-leaderboard-position-with-shortcode/)
 * I’ve done everything I could think of to try and troubleshoot this issue, but
   I’m stuck. I’m trying to get the leaderboard position based on balance for my
   users’ individual profiles using `[mycred_leaderboard_position user_id=<put user
   id here>]` but I’m getting this:
 *     ```
       WordPress database error: 
       [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM ( SELECT s.*, @rank := @rank + 1 rank FROM ( SELECT l.user_i' at line 1]
       ```
   
 * I tried to use the args from this topic: [https://wordpress.org/support/topic/how-to-get-user-leaderboard-position/](https://wordpress.org/support/topic/how-to-get-user-leaderboard-position/)
   with no luck.
 * I’ve tried every variation of the shortcode I could think of (with quotes, without
   quotes, etc) and the most I’ve been able to generate is a dash which, I think,
   means the entry is “missing”, but the main leaderboard page shows everybody just
   fine.
 * [https://wackywriters.com/leaderboards/](https://wackywriters.com/leaderboards/)
 * Any ideas?
 * Also, the documentation link provided in the shortcode file ([http://codex.mycred.me/shortcodes/mycred_leaderboard_position](http://codex.mycred.me/shortcodes/mycred_leaderboard_position))
   leads to a 404.
 * Site info:
    URL: wackywriters.com MyCred version: 2.1.1 Wordpress version: 5.7.2
    -  This topic was modified 4 years, 10 months ago by [caitlinelysey](https://wordpress.org/support/users/caitlinelysey/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [caitlinelysey](https://wordpress.org/support/users/caitlinelysey/)
 * (@caitlinelysey)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/errors-retrieving-user-leaderboard-position-with-shortcode/#post-14717421)
 * Any word on this?
 *  [wpexpertssupportteam](https://wordpress.org/support/users/wpexpertssupportteam/)
 * (@wpexpertssupportteam)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/errors-retrieving-user-leaderboard-position-with-shortcode/#post-14726435)
 * Hi [@caitlinelysey](https://wordpress.org/support/users/caitlinelysey/),
 * Thank you for contacting us, This issue has already been reported and fixed we
   will be including this fix in the upcoming update.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Errors retrieving user leaderboard position with shortcode’ is closed
to new replies.

 * ![](https://ps.w.org/mycred/assets/icon-128x128.gif?rev=3512531)
 * [Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred](https://wordpress.org/plugins/mycred/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mycred/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mycred/)
 * [Active Topics](https://wordpress.org/support/plugin/mycred/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mycred/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mycred/reviews/)

## Tags

 * [leaderboard](https://wordpress.org/support/topic-tag/leaderboard/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 2 replies
 * 2 participants
 * Last reply from: [wpexpertssupportteam](https://wordpress.org/support/users/wpexpertssupportteam/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/errors-retrieving-user-leaderboard-position-with-shortcode/#post-14726435)
 * Status: resolved