Hi there,
Is it possible to show a CSV download link on a user dashboard (not admin) without showing the entire table?
The reason I ask is that the table we are offering a download for has over 150k rows.
Thanks!
Hugo
Hi,
Thanks a lot for your great plugin!
I have created a query and added it to a page, and I would like the data to be extracted as per the current user id so that the user only sees his own data.
I have added the php variable you mentioned in the FAQ, as follow:
SELECT * FROM ….
WHERE ….
AND post_author='<?php $current_user->ID ?>’
>> The Query does display results, however, it does not filter properly on the current user viewing the page.
So for example, Current user 2 is also seeing the lines of user 1.
Is anything that should be added or any other variable to be used to have the filter on current user working properly?
Thanks
Regards
]]>Error: SELECT command denied to user ‘xxx’@’xx.xxx.com’ for table ‘ost_ticket’
How can I set the login to a differnt user name
]]>Hi, every time I try and add a custom parameter to a report eg;
WHERE START_DT > (‘<?php $_GET[thedate] ?>’)
I get the following error:
There has been a critical error on this website. Please check your site admin email inbox for instructions.
Is there a way around this at all? Thanks.
]]>A nice piece of work!
It would be nice to sort on columns!
History: I migrated site from one dedicate server to another with the same hosting company. Since then I have been having errors with the site. I thought the problem was with the iThemes security plugin…since once I would log in I would get a 500 server error. I started troubleshooting by disabling all the plugins then adding them back one by one until I could reproduce the error. Once I enable the EZ SQL Reports Shortcode Widget and DB Backup the site would go down.
I’ve several pages utilizing the SQL plugin and would rather fix this instead of finding another plugin.
]]>Hi there – thanks for this plug in. Trying to use the [sqlgetvar] short cut with a query to the wp_post data table.
SELECT
DATE_FORMAT (MAX(post_date), ‘%b %e %Y at %I:%i %p’) as last_updated
FROM
wp_posts
WHERE
post_title = ‘PETE’S BRASS RAIL AND CAR WASH’ AND
comment_status =’closed’
I get the error = This SQL Query has not been allowed by an Administrator.
I have copied this query exactly from the SQL Reports that I also saved per the instructions.
I also tested the sample “user count” query that you have in the documenation that queries the wp_users table and that worked fine.
Thanks for any help.
Regards,
Brad
Sorry to reopen this thread but I can’t solve this issue (WP 5.8) …
It’s really a pity because it’s one of the rare plugins to offer to publish SQL query results directly in a post!
Regards
Hello Eli,
Each year I’m helping someone to organize a photo contest for disabled people.
Your EZ SQL Reports has been working fine for a few years.
Now I have an error like this :
Error: SELECT command denied to user ‘ID61464_art1’@’5.134.4.23’ for table ‘wp_users’
I did not get this error last year, has it to do with the WP version or the PHP version ?
Any idea why this error comes up ?
Also, could you possibly update to version 5.8 of WP, or do you no longer provide updates ?
Thank you for informing me.
]]>I’m currently use CustomerID = <?php $current_user->user_login ?> to get invoice data for the current user. We recently started adding multiple users that are in the same company and the naming convention is customerID + first 3 digits of their first name.
How would I add a wildcard to the <?php $current_user->user_login ?> ?
]]>Hi Eli,
I hope you could help me with this issue:
the following query
SELECT arg_id FROM vrb_new_arg WHERE arg_id=<?php $_GET[wpda_search_column_arg_id]; ?>
works fine if I use the regulart shortcode
[SQLREPORT name=”sqlvartest”]
However in this form
[sqlgetvar]SELECT arg_id FROM vrb_new_arg WHERE arg_id=<?php $_GET[wpda_search_column_arg_id]; ?>[/sqlgetvar]
I obtain the following result
This SQL Query has not been allowed by an Administrator.
But if I sobstitute the this method <?php $_GET[wpda_search_column_arg_id]; ?> with the actual url parameter like this
[sqlgetvar]SELECT arg_id FROM vrb_new_arg WHERE arg_id=2 [/sqlgetvar]
the result is correct
could you help me with this?
thanks a lot
Daniele
]]>ez sql version 4.17.42 causes notice “Deprecated: Function create_function() is deprecated in /elisqlreports/index.php on line 881″
Please change code from:
add_action(‘widgets_init’, create_function(”, ‘return
register_widget(“ELISQLREPORTS_Widget_Class”);’));
to:
add_action(‘widgets_init’, function() {
return register_widget(“ELISQLREPORTS_Widget_Class”);} ) ;
Thanks in advance for your time.
Roy
for those who need to export in CSV the generated result table, this javascript/jQuery snippet does the trick:
I personally use “CUSTOM CSS AND JS” plugin with this code set to Admin pages
jQuery(document).ready(function( $ ){
jQuery.getScript('https://cdn.jsdelivr.net/npm/[email protected]/src/table2csv.min.js', function () {
if ($(".ELISQLREPORTS-table").length)
{
$('table.ELISQLREPORTS-table').each(function () {
var $table = $(this);
var $title = $(".ELISQLREPORTS-Report-Name")[0].textContent;
var $button = $("<button type='button'>");
$button.text("Export to CSV");
$button.insertBefore($table);
$button.click(function () {
$table.table2csv('download', { 'filename': $title + ".csv" });
});
});
}
});
});
/*
https://github.com/OmbraDiFenice/table2csv
*/
]]>
Hi there
Is it possible for you to add these features?
– Option to remove table, which will be handy to showcase single value.
– Accept multiple queries in a single go, and have multiple shortcodes in the right hand side. (E.g. “SELECT * From Customers; SELECT * From Products;” should be accepted and should have two shortcodes, the first to showcase first query result, and the second shortcode to showcase second query result.
I will be happy to pay you for above customization, as long as I can afford it. Please let me know.
Thanks.
]]>I am wondering if your plugin can simply return a single plain digit response without any fancy style or box or any style applied except font family style ,size ,color and weight. I need to get a count() from my table and just embed that result into my elementor page in a short code widget.
]]>Hello sorry I’m a beginner, I’m looking for a way to make a search engine from a mysql table called archivosingoli,
I have an archive of karaoke bases of 33000 rows and 5 columns (Author, Title, Format, Sinconizer, Date) I would like through two search forms one by Author and one by Title to query this archive and the results by Author or Title come out in a table. I do not understand much of the query I saw this plugin that should do it my way but I do not understand how to do it.
Hi,
I have a query that contains 7 columns which is now in a table on a page (thanks).
The issue I am having is that each column is the same width but they contain various lengths of data.
e.g. 2 columns only contain INTs so I would like them to be more narrow, whilst others contain long strings that I would like to be wider as they are currently wrapping and causing some rows to double in height.
I am looking to do this from the WordPress Admin pages if possible.
I found an earlier post regarding the a general column width where you suggested using the below;
.ELISQLREPORTS-table td {width: 50%}
but as I said I am looking to apply different widths to different columsn if possible.
thanks in advance
I tried to run this query SELECT display_name FROM wp_users WHERE ID = '<?php $current_user->ID ?>'
but it’s given this error:
This SQL Query has not been allowed by an Administrator.
Does anybody knows how to solve the problem?
]]>Hello guys, great plugin, thanks for that!
I have a question related to bulk reports creation. I have hundreds of users in my database and I need to create 4 identical report for each of them. So the only difference in SQL query will be WHERE condition. Is it possible somehow to import those queries somewhere in the database? Where are those report kept?
]]>Firstly, excellent plugin. Thank you.
I’m trying to prevent the report name showing, to stop the header row showing and to stop the table borders showing.
I’ve placed the following code on the page concerned, using the text editor.
<style>
.ELISQLREPORTS-Report-Name {display: none;}
.ELISQLREPORTS-Header-Row {display: none;}
.ELISQLREPORTS-table td {border: 0px;}>
</style>
The only override that doesn’t work is that the top and the left borders for the table still show. All the other borders disappear.
I’ve used ‘border: none’ and ‘border: 0px’ without success.
Any suggestions.
]]>I am using the following shortcode:
[sqlgetvar]SELECT CONCAT(CAST(date_format(STR_TO_DATE(englishdate,’%m/%d/%Y’),’%M %d, %Y’) AS CHAR), ” / “, islamicmonth, ” “, dayofmonth, ” “, hijriyear) AS islamicdate FROM
islamicdates
WHERE date_format(STR_TO_DATE(englishdate,’%m/%d/%Y’),’%c/%d/%Y’)=date_format(now(),’%c/%d/%Y’)[/sqlgetvar]
I have also pasted the exact same query and saved it as a report, where it runs fine and returns the record as expected like this:
===============================
islamicdate
===============================
May 17, 2018 / Ramadhan 1 1439
===============================
But I am still getting the following error on the page where I have used the shortcode:
Notice: Undefined index: SELECT CONCAT(CAST(date_format(STR_TO_DATE(englishdate,’%m/%d/%Y’),’%M %d, %Y’) AS CHAR), ” / “, islamicmonth, ” “, dayofmonth, ” “, hijriyear) AS islamicdate FROM islamicdates
WHERE date_format(STR_TO_DATE(englishdate,’%m/%d/%Y’),’%c/%d/%Y’)=date_format(now(),’%c/%d/%Y’) in /home/alkhoe5/public_html/wp-content/plugins/elisqlreports/index.php on line 947
This SQL Query has not been allowed by an Administrator.
Is it possible to suppress the column names in the report output?
Also can I change the table border to be none?
]]>I’m trying to pass a date range through the URL – It all makes sense but I can’t save a report with an error and I keep getting an error when I try to save – here’s my sql query without the parameters:
SELECT * FROM 40e_rg_lead
WHERE form_id=4 && status
=”active” and date_created
BETWEEN “2018-01-01” and “2018-02-01”
Here’s what I’m using with the parameters
SELECT * FROM 40e_rg_lead
WHERE form_id=4 && status
=”active” and date_created
between date(‘<?php $_GET[date_from]; ?>’) and date(‘<?php $_GET[date_to]; ?>’)
I am using 4.17.38 to create hourly backups. Retaining 7 hourly and 7 daily backups.
Unfortunately the plugin does not seem to clean up hourly backups correctly and leaves them on the site. Is this correct?
]]>Hi! I feel I’m close on this, but I am totally missing something.
I have on one page a form where I simply want someone to enter a surname, if they want to, as the table grows. Then below the form are the results of the query. I do want all rows to populate by default.
I have tried the php gets and I’m about to beat my head against the wall. Thinking that within the SQL query report that the where statement needs to include a link to the page….But I get “no results” and if the form has nothing entered, I want it to show all values.
Okay, Here is the code I have on Surname-Search page:
<form action=”” method=”post”>Search Surname: <input name=”searchsurname” type=”search” /> <input type=”submit” value=”Submit” /></form></br>
[SQLREPORT name=”test-surname-list”]
Now here is the query in the SQLReport as it is now that works:
SELECT CONCAT(‘‘,’‘,’‘) as ‘Email’, surname as ‘Surname’, county as ‘County’, state, country as ‘Country’, yearbegin as ‘Begin Year’, yearend as ‘End Year’ from database.wp_surnames ORDER By surname
The following is just one of the Select statements I’ve tried:
[$query = $_GET[“https://website/surname-search2/searchsurname”];
echo ELISQLREPORTS_view_report(“”, “SELECT CONCAT(‘‘,’‘,’‘) as ‘Email’, surname as ‘Surname’, county as ‘County’, state as ‘State/Prov/Reg’, country as ‘Country’, yearbegin as ‘Begin Year’, yearend as ‘End Year’ from database.wp_surnames WHERE (surname ='<?php $query?>’)”);]
Is there any chance that this plugin could call maybe_unserialize() in some specific fields? (I imagine a checkbox to activate this feature and a textbox to specify the column field)
I get the ugly serialized array and I can’t get it in any readable form.
Thanks
]]>After the update of the plugin yesterday, I’m now getting the message “This SQL Query has not been allowed by an Administrator.” where the sqlgetvar code is on my site.
]]>Hi,
is there a way to select an external database? It’s running on the same (local) MariaDB installation, same user/pass, though another table.
I have weather-data stored and want to display some news-TV like “scrolling text”. Any way to get a single line, too? Would be good enough if I could do 1 shortcode for every column to catch the latest data.
]]>When I run the following query in SQL it runs fine, but when run in EZ SQl Reports, it is giving some type of Vector results:
SELECT
u1.*,
m1.meta_value AS firstname,
m2.meta_value AS lastname,
FROM wp_users u1
JOIN wp_usermeta m1 ON (m1.user_id = u1.id AND m1.meta_key = ‘first_name’)
JOIN wp_usermeta m2 ON (m2.user_id = u1.id AND m2.meta_key = ‘last_name’)
I have this query in the plugin admin page, but when I put the short code on my page, it only shows One Row of the entries, when there should be more. If I HARD CODE an ID in this same query, it shows my data correct with all the rows that are supposed to be there. So, basically the query works in the plugin, but it’s not working on the page unless the ID is hard coded. Any help is appreciated. Thanks.
SELECT
wp_frm_items.id AS store_id,
MAX(IF(wp_frm_item_metas.field_id = 96, wp_frm_item_metas.meta_value,”)) User_ID,
MAX(IF(wp_frm_item_metas.field_id = 97, wp_frm_item_metas.meta_value,”)) Date,
MAX(IF(wp_frm_item_metas.field_id = 546, wp_frm_item_metas.meta_value,”)) Day
FROM wp_frm_items, wp_frm_item_metas
WHERE wp_frm_items.id = wp_frm_item_metas.item_id
AND wp_frm_items.user_id = ‘<?php $_GET[ID] ?>’
AND wp_frm_item_metas.field_id IN (96, 97, 546)
GROUP BY wp_frm_items.id
ORDER BY Date DESC;