Ad-hoc database queries
Maintained by
Tim Hunt, Mahmoud Kassaei, Hieu Vu Van
This report plugin allows Administrators to set up arbitrary database queries
to act as ad-hoc reports. Reports can be of two types, either run on demand,
or scheduled to run automatically. Other users with the right capability can
go in and see a list of queries that they have access to. Results can be viewed
on-screen or downloaded as CSV.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
I neglected to mention one other detail - we have the exact same report built using the configurable reports plugin and that report does not produce the duplicates either.
Does that change your recommendation at all?
Thank you again!
Kristin
Can you try executing the query directly in MySQL. I wonder if mySQL Workbench is hiding duplicate rows for some reason.
When I pull the query logic out of the ad hoc db query and run it in mySQL Workbench, I do not get duplicates.
I even tried to pull the logic directly out of the mdl_report_customsql_queries table and running that in mySQL Workbench and I still can't recreate the duplicates.
I've tried doing a Notepad++ file compare between the logic in the table and the logic on the front end - nothing.
I re-read the fine print in the plugin on the front end and I saw mention of what it does when a column ends in the word "date". I did have a column that ended with "date" and I changed it to avoid any chance of issue there. Still duplicates.
We've upgraded the plugin to the newest available version.
Any thoughts on why this might be happening?
Thank you in advance.
Kristin
How can I contribute to do it?
I have the same problem with Email sending function.
Even though CSV files were saved, sending email has not worked since upgrading 3.7.
Moodle 3.7+ (Build: 20190628) / Plugin Ver: 2018112200
I got the following message for the Failed tasks in the Cron Task logs page.
!!! Coding error detected, it must be fixed by a programmer: A lock was created but not released at:
[dirroot]/lib/cronlib.php on line 99
Code should look like:
$factory = \core\lock\lock_config::get_lock_factory('type');
$lock = $factory->get_lock(Resource id #565);
$lock->release(); // Locks must ALWAYS be released like this.
!!!
Is it related to the issue?
Our system is no longer sending out email notifications for our reports we have set to run daily. I think I tracked it down to an error about `message_send() must be an instance of core\message\message, instance of stdClass given`, which reminded me of a commit I saw on the GitHub repo. However, the code available on this page does not include that commit.
I posted a longer explanation as an issue on your GitHub repo. I would deeply appreciate it if anyone could take a look and provide any insight. Thank you!
https://github.com/moodleou/moodle-report_customsql/issues/60
- Ray
Even with a daily report, I don't think the archive could possibly fill up, so I don't konw why it has stopped working for you. Note that it only archives if the report includes some data.
I was wondering if its possible to modify the schedule settings of the plugin to run every 5 minutes and save the csv somewhere in the server?
shall you confirm this plugin offer the feature to send reports by night ? By example, every monring, i need to get the list of last created account (new subscribers).
i read at the documentation and i can't see any information about email sending, setitng a date timer to send....
ps : why so few screenshots of this plugin ?
thank you
Is it possible that an option to the limit of rows to be displayed can be added in the plugin? Or any other recommendation to view more than 5000 rows rather than changing it from the /reports/customsql/locallib.php
Regards,
As the export and import is scheduled and pushed automatically in Ad Hoc the later sounds a viable solution.
SMS vendor wouldn't change for just us.
I shall also see if configurable report can be cofigured to svhedule download as it produces CSV format without double quote.
Thanks for you response and time.