I am creating a custom query builder, when user has created his query he can verify the query syntax by clicking a button. When the user click on the button to verify, An AJAX call is sent to the server with the query and execution of the query starts, during this time user can see a modal on his screen with a cancel button. If by any chance user clicks on the cancel button I want the send another AJAX call to the server to kill the execution of the query.
Currently I am only able to kill the AJAX call which I originally send and my page works fine at user end
but I am looking for a PHP code to stop the MYSQL query at server side because some queries can be quite heavy and run for a long time