File manager - Edit - /home/autoph/public_html/connectv1/my.php
Back
<?php // Connection to query on $query_con = mysqli_connect('127.0.0.1', 'root', '', 'autoph_db' , '3306'); // Connection to kill on $kill_con = mysqli_connect('127.0.0.1', 'root', '', 'autoph_db' , '3306'); $slow_query = "SELECT UUID();"; // Start the query $query_con->query($slow_query, MYSQLI_ASYNC); // Get the PID $thread_id = $query_con->thread_id; // Ignore user abort so we can kill the query ignore_user_abort(true); do { // Poll MySQL $links = $errors = $reject = array($mysqli->mysqli); $poll = mysqli_poll($links, $errors, $reject, 0, 500000); // Check if the connection is aborted and the query was killed if (connection_aborted() && mysqli_kill($kill_con, $thread_id)) { die(); } } while (!$poll); // Not aborted, so do stuff with the result $result = $link->reap_async_query(); if (is_object($result)) { // Select while ($row = $result->fetch_object()) { var_dump($row); } } else { // Insert/update/delete var_dump($result); }
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings