Title: EZ SQL Reports Shortcode Widget and DB Backup
Author: Eli
Published: <strong>Декабрь 15, 2011-ж.</strong>
Last modified: Июнь 26, 2025-ж.

---

Плагиндерди издөө

![](https://ps.w.org/elisqlreports/assets/icon-256x256.png?rev=1231385)

# EZ SQL Reports Shortcode Widget and DB Backup

 Автору [Eli](https://profiles.wordpress.org/scheeeli/)

[Жүктөө](https://downloads.wordpress.org/plugin/elisqlreports.5.25.25.zip)

 * [Кенен маалымат](https://ky.wordpress.org/plugins/elisqlreports/#description)
 * [Сын-пикирлер](https://ky.wordpress.org/plugins/elisqlreports/#reviews)
 *  [Орнотуу](https://ky.wordpress.org/plugins/elisqlreports/#installation)
 * [Development](https://ky.wordpress.org/plugins/elisqlreports/#developers)

 [Колдоо](https://wordpress.org/support/plugin/elisqlreports/)

## Сүрөттөө

Just place some SQL on in the box and save it as a report. You can save multiple
reports and they will be listed on the Admin Menu so you can quickly run them again
anytime with just one click. You can place your reports on the User’s Dashboard 
based on Roles. You can also put a report on a Page or Post using a shortcode like[
SQLREPORT name=”My Report” style=”padding: 6px;” /]

There is also an shortcode for the wpdb::get_var function that you can use to display
a single value from your database. For example, this will display the number of 
users on your site:
 [sqlgetvar]SELECT COUNT(*) FROM wp_users[/sqlgetvar] Note: 
because of a known exploit in the WordPress shortcode functionality it is required
that an admin user create an SQL Report with the exact query that will be used in
the sqlgetvar shotcode, otherwise any subscriber could white their own shortcode
query.

If you want to include an “Export to CSV” button on your page or post then use the
additional shortcode [SQLEXPORTCSV] once on any page or post that contains a report
you want visitors to be able to download. Thanks to @loristictok and @rob66bnu for
posting the suggestion with the JavaScript that I used to make this new Shortcode.

Note: Adding this shortcode to the just one time will insert the “Export to CSV”
button at the top of every HTML Table on the page.

#### Automatic Database Backups

Your database can be automatically saved and archived every hour and/or every day,
and backups can be emailed to the address you specify. You can also restore the 
data to your WP DB or an external DB, which makes copying your database to another
server and easy task.

## Скриншоттор

 * [[
 * This is a screenshot of the Plugin Settings and the Admin Menu with some example
   reports.

## Орнотуу

 1. Download and unzip the plugin into your WordPress plugins directory (usually `/
    wp-content/plugins/`).
 2. Activate the plugin through the ‘Plugins’ menu in your WordPress Admin.

## FAQ.KG

### What do I do after I activate the Plugin?

Start Creating and Saving Reports.

### How do I get one of my reports onto a Page or Post?

Just use the shortcode SQLREPORT like this [SQLREPORT name=”My Report” style=”border:
2px solid #CCCCCC; padding: 6px;” /] but be sure the name attribute matches the 
exact name of a report you have already created.

### How do I use a global PHP variable in one of my SQL queries?

Note: This < does not display properly on web pages so I used the HTML code < in
this example, > works…

SELECT display_name FROM wp_users WHERE ID = ‘<?php $current_user->ID ?>’
 (There
are other ways to get the display name in WordPress, this is just a simple example
to illustrate the proper syntax.)

Update: Unfortunately this feature has been restricted due to security concerns 
from the WordPress plugin review team and so only current_user variables are available
in version 5.25.11 or above no other php expressions will be evaluated.

## Сын-пикирлер

![](https://secure.gravatar.com/avatar/ff3ec426385e31fad37f86e183f1d96493bad0d593cfa0b2805596c78c425fad?
s=60&d=retro&r=g)

### 󠀁[Big thanks for a Great plugin](https://wordpress.org/support/topic/big-thanks-for-a-great-plugin/)󠁿

 [ailaina123456](https://profiles.wordpress.org/ailaina123456/) Май 10, 2024-ж.

Very grateful for this plugin that helped me to do so much on my website easily!
Hope it could be updated in the future. Thanks a ton!

![](https://secure.gravatar.com/avatar/230abfbbbf5897bcaa109967766f0db5388dbd8d580343b4a9f393ec43bc6261?
s=60&d=retro&r=g)

### 󠀁[Perfect light little tool](https://wordpress.org/support/topic/perfect-light-little-tool/)󠁿

 [](https://profiles.wordpress.org/daisycutter/) Май 6, 2024-ж.

There are a bunch of expensive and bloated options that try to do what this plugin
does for free and don’t quite get there. Had reports being produced within half 
an hour of finding it, very happy.

![](https://secure.gravatar.com/avatar/9faf382c44a1714576825f1eb5ed386a631bec776a870f5f06b1430a2bb85700?
s=60&d=retro&r=g)

### 󠀁[Excellent reporting tool](https://wordpress.org/support/topic/excellent-reporting-tool/)󠁿

 [rob66bnu](https://profiles.wordpress.org/rob66bnu/) Сентябрь 7, 2021-ж.

I find this plug-in invaluable for producing reports that combine information from
multiple plug-ins, such as membership and event ticket sales. Very stable and very
flexible. Thanks for the September 2021 update. The new shortcode for adding a “
Export to CSV” button is a great addition!

![](https://secure.gravatar.com/avatar/67cf2d9b95e139fd7b5fc40bdfa66f218d9a911eee61d5887d0eaaea14e2cd71?
s=60&d=retro&r=g)

### 󠀁[Good reporting tool](https://wordpress.org/support/topic/good-reporting-tool/)󠁿

 [J Werk](https://profiles.wordpress.org/jwerk13040/) Январь 4, 2019-ж.

I’ve found this plugin useful to produce custom reports for website owners who don’t
have the skills to run SQL queries in phpMyAdmin. I’d gladly pay for a premium version
if it had at least an export to CSV button. Some extra styling options would be 
good too.

![](https://secure.gravatar.com/avatar/ab651bdd8fceb000e41101b37731099dac6f6c98356517d8c54d9aecc70acc8a?
s=60&d=retro&r=g)

### 󠀁[Deprecated](https://wordpress.org/support/topic/deprecated-24/)󠁿

 [henkmans](https://profiles.wordpress.org/henkmans/) Октябрь 8, 2018-ж. 1 reply

Plugin gives error in WordPress 4.9.8 Deprecated: Function create_function() is 
deprecated in C:\xampp\htdocs\wp\wp-content\plugins\elisqlreports\index.php on line
881

![](https://secure.gravatar.com/avatar/c319972dbf648ec0004feef166c64277d4cbfd8d5158a8f4e11c3a2491d895e2?
s=60&d=retro&r=g)

### 󠀁[Awesome plugin](https://wordpress.org/support/topic/awesome-plugin-2347/)󠁿

 [onyxtacular](https://profiles.wordpress.org/onyxtacular/) Октябрь 3, 2018-ж.

Works great. Just need better docs for us newbs

 [ Read all 15 reviews ](https://wordpress.org/support/plugin/elisqlreports/reviews/)

## Contributors & Developers

“EZ SQL Reports Shortcode Widget and DB Backup” is open source software. The following
people have contributed to this plugin.

Мүчөлөрү

 *   [ Eli ](https://profiles.wordpress.org/scheeeli/)

[Translate “EZ SQL Reports Shortcode Widget and DB Backup” into your language.](https://translate.wordpress.org/projects/wp-plugins/elisqlreports)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/elisqlreports/), check
out the [SVN repository](https://plugins.svn.wordpress.org/elisqlreports/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/elisqlreports/) 
by [RSS](https://plugins.trac.wordpress.org/log/elisqlreports/?limit=100&mode=stop_on_copy&format=rss).

## Өзгөртүүлөр

#### 5.25.25

 * Fixed 2 PHP Warnings about Undefined array keys.
 * Added sanitization to the Report_Name to fix Stored Cross-Site Scripting that
   could otherwise have been injected by any User with the Contributor Role or higher.
 * Escaped output variable that are used in evaluated queries and extented the usage
   to simple Request variables which are all added via the prepare function.

#### 5.25.11

 * Due to security concerns from the WordPress plugin review team, I have removed
   the ability to insert evaluated PHP expressions into reports except for values
   of the global current_user object.

#### 5.25.10

 * Added Nonce Tokens to the wp-admin forms to fix CSRF in Report creation and on
   the plugin settings page.

#### 5.25.08

 * Added a filter to the style property of the Report-DIV to remove the ability 
   of content authors to insert scripts into the shortcode that generates the Report
   HTML. Now you’ll have to put those scripts directly into your content after the
   shotcode if you want to add them.

#### 5.21.35

 * Added a Shortcode to put an “Export to CSV” button above the output Table so 
   that a Report can be downloaded.
 * Fixed the “create_function() is deprecated” error to make the plugin compatible
   with the newest versions of PHP and WordPress.
 * Fixed an Undefined Index notice and cleaned up some older code that wasn’t needed
   any more.

#### 4.17.42

 * Fixed the deletion of old backup files when the commandline backup method is 
   used.

#### 4.17.38

 * Changed all mysql_ functions to mysqli_ to fix deprecation errors in newer versions
   of PHP.
 * Fixed the usage of %s in queries containing PHP variables.
 * Fixed a vulnerability in the shortcodes that could be exploited by subscriber
   level users, thanks to J.D. Grimes for discovering this WordPress exploit.

#### 4.16.38

 * Removed menu_group option to fix add_object_page deprecated bug.
 * Moved mysql_connect to fix deprecation error in some newer versions of PHP.
 * Fixed the saving of the custom backup directory setting.

#### 4.11.37

 * Fixed two vulnerabilities that could be exploited by site admins, thanks to Felipe
   Molina for discovering these bugs.

#### 4.11.33

 * Upgraded Widget Class for compatibility with WordPress 4.3 changes.

#### 4.11.15

 * Fixed some minor styles in the admin pages.
 * Added a feature to hide all the reports from the main admin menu.

#### 4.11.13

 * Fixed some minor bugs and improved the handling of multiple queries.
 * Added a call to do_shortcode to the query results so that shortcodes rendered
   in a report can be evaluated.

#### 4.1.76

 * Made minor layout changes and enhancements to the Edit Reports page.
 * Fixed the Delete Report button to work even when the queries fails.
 * moved to the global wpdb object for full compatibility with WP 3.9 on MySQL 5.5.

#### 3.10.19

 * Fixed table header row that contains column names.
 * Added an SQL Reports widget for the sidebar and footer area.
 * Added support for multiple queries on one report.

#### 3.08.03

 * Improved the compatibility and reliability of the restore process.

#### 3.06.29

 * Add ability to place reports on the dashboard for a given Role.

#### 3.06.24

 * Created a second method for backups that uses the command line mysql.
 * Made compression optional and backup location changable.
 * Made restore function able to connect to external an DB.
 * Fixed shortcode to work with sanitize_title.

#### 3.06.14

 * Added a WP cron scheduler for hourly and daily backups.
 * Upgraded the Backup process to ZIP and email all backups.
 * Added a shortcode for wpdb::get_var

#### 1.3.03.24

 * Fixed the Backup process to capture VIEW definitions properly.

#### 1.3.03.02

 * Added database backup feature.
 * Fixed Report name issue when using apostrophes.

#### 1.3.02.12

 * Added Menu Placement and sorting options.
 * Expanded eval function to take multiple global variables.

#### 1.3.01.28

 * Added eval function to take PHP code in the SQL Statement.

#### 1.2.09.23

 * Added css classes to the Table and TRs for better style control.

#### 1.2.04.16

 * Added error message to the Edit Report Page if SQL statement fails.

#### 1.2.04.06

 * Added shortcode support so you can put your reports onto Pages and Posts.

#### 1.1.12.16

 * Added styled DIV around Reports with ID tag so that you can customize the style.

## Мета

 *  Нуска **5.25.25**
 *  Акыркы жаңыртуу **10 ай мурун**
 *  Активдүү орнотуулар **500+**
 *  WordPress нускасы ** 2.6 же андан жогору **
 *  Tested up to **6.8.5**
 *  Тил
 * [English (US)](https://wordpress.org/plugins/elisqlreports/)
 * Тег:
 * [backup](https://ky.wordpress.org/plugins/tags/backup/)[database](https://ky.wordpress.org/plugins/tags/database/)
   [reports](https://ky.wordpress.org/plugins/tags/reports/)[shortcode](https://ky.wordpress.org/plugins/tags/shortcode/)
   [sql](https://ky.wordpress.org/plugins/tags/sql/)
 *  [Advanced View](https://ky.wordpress.org/plugins/elisqlreports/advanced/)

## Рейтинг

 4.7 out of 5 stars.

 *  [  13 5-star reviews     ](https://wordpress.org/support/plugin/elisqlreports/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/elisqlreports/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/elisqlreports/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/elisqlreports/reviews/?filter=2)
 *  [  1 1-star review     ](https://wordpress.org/support/plugin/elisqlreports/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/elisqlreports/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/elisqlreports/reviews/)

## Мүчөлөрү

 *   [ Eli ](https://profiles.wordpress.org/scheeeli/)

## Колдоо

Комментарийлер барбы? Жардам керекпи?

 [Колдоо форумун көрүү](https://wordpress.org/support/plugin/elisqlreports/)

## Кайрымдуулук

Would you like to support the advancement of this plugin?

 [ Кайрымдуулук кылуу ](https://www.paypal.com/donate?hosted_button_id=ZN3QCSQ74R5J6)