Title: Query was Empty debug error
Last modified: August 21, 2016

---

# Query was Empty debug error

 *  Resolved [gtm1ldy](https://wordpress.org/support/users/gtm1ldy/)
 * (@gtm1ldy)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/query-was-empty-debug-error/)
 * Thank you for this plugin, it is a life saver for running reports!
 * Am having a few issues with posting the shortcode for a report on a page.
 * Running the report in the admin section is fine, however on a page, the query
   is empty.
 * It is a query that selects the company name and all the employees, inner joined
   from two tables based on the WP $current user logged in.
 * Basically, all 12,000 registered WP user accounts have their WP ID as the Company
   Code allowing us to display company reports, product registrations, comments 
   and such stored in custom tables based on the user that logs in.
 * Any thoughts on this?
 * Thanks again!
 * Mike
 * [http://wordpress.org/extend/plugins/elisqlreports/](http://wordpress.org/extend/plugins/elisqlreports/)

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

 *  Plugin Author [Eli](https://wordpress.org/support/users/scheeeli/)
 * (@scheeeli)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/query-was-empty-debug-error/#post-3874401)
 * I was just now able to recreate this Debug error “Query was Empty” when using
   the global $current_user in a query on the front of one of my sites.
 * I will figure out why it is doing this and ave a solution for you soon.
 * Thanks for bringing this to my attention.
 * Aloha, Eli
 *  Plugin Author [Eli](https://wordpress.org/support/users/scheeeli/)
 * (@scheeeli)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/query-was-empty-debug-error/#post-3874460)
 * I just figured out that there is a bug in the shortcode example on the report
   admin page. If you have a report called “Company Reports” then you admin page
   tells you to use this shortcode:
    [SQLREPORT name=”company-reports”] but that
   does not work, you actually need to use this shortcode: [SQLREPORT name=”Company
   Reports”]
 * I will fix it so that either will work in my next release (hopefully tomorrow).
 * Aloha, Eli
 *  Plugin Author [Eli](https://wordpress.org/support/users/scheeeli/)
 * (@scheeeli)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/query-was-empty-debug-error/#post-3874498)
 * I just released a Plugin update that fixes this issue so that you can use either
   of the shortcode methods above.
 * Thanks again for reporting this issue to me.
 * Aloha, Eli
 *  Thread Starter [gtm1ldy](https://wordpress.org/support/users/gtm1ldy/)
 * (@gtm1ldy)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/query-was-empty-debug-error/#post-3874507)
 * Awesome Eli, Thank you!! That was completely the issue. Capitals in the shortcode
   matter as well.
 * Any chance you could add an update to all these reports to be displayed on the
   wordpress Dashboards? 🙂
 * I miss Hawaii.
 *  Plugin Author [Eli](https://wordpress.org/support/users/scheeeli/)
 * (@scheeeli)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/query-was-empty-debug-error/#post-3874510)
 * That a good idea. I think I will do that in my next release.
 * Where did you live in Hawaii?
 *  Thread Starter [gtm1ldy](https://wordpress.org/support/users/gtm1ldy/)
 * (@gtm1ldy)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/query-was-empty-debug-error/#post-3874511)
 * I lived at Schofield Barracks. Should have never left. If you are interested 
   in speeding up the “next release”, I’d be willing to finance and work with you
   on this. This would be huge for me.
 * Not sure how to PM you but if you are interested, let me know. Big project (14,0000
   users) and this would be an amazing addition.
 * Mike
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/query-was-empty-debug-error/#post-3874512)
 * This topic has now been closed as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Offering_to_Pay)

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

The topic ‘Query was Empty debug error’ is closed to new replies.

 * ![](https://ps.w.org/elisqlreports/assets/icon-256x256.png?rev=1231385)
 * [EZ SQL Reports Shortcode Widget and DB Backup](https://wordpress.org/plugins/elisqlreports/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/elisqlreports/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/elisqlreports/)
 * [Active Topics](https://wordpress.org/support/plugin/elisqlreports/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/elisqlreports/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/elisqlreports/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/query-was-empty-debug-error/#post-3874512)
 * Status: resolved