This plugin will enable you to define multiple queries/scripts which: 1. can be run online (by admin) 2. can be scheduled in which case results are emailed to nominated recipients
APPLICATION ERROR 401
Database query failed. Error received from database was #1364: Field 'query_script' doesn't have a default value for the query: INSERT INTO mantis_plugin_Query_definitions_table ( query_name,query_type,query_lvl,query_desc ) VALUES ( 'Count bugs','Q', 'U','Count bugs').
Problem is, your INSERT query in query_add.php is only specifying 4 fields query_name,query_type,query_lvl,query_desc but the other fields in the table are all NOT NULL.
Error details
APPLICATION ERROR 401 Database query failed. Error received from database was #1364: Field 'query_script' doesn't have a default value for the query: INSERT INTO mantis_plugin_Query_definitions_table ( query_name,query_type,query_lvl,query_desc ) VALUES ( 'Count bugs','Q', 'U','Count bugs').
Stack trace
Table structure
This is with a fresh install of Query plugin (v2.13).
The Same error was reported by @ZakharchukEduard in https://github.com/mantisbt-plugins/Query/issues/3#issuecomment-2107338672