⇧
vadnica-logo
My Services About the Project Telegram O meni O meni

MYSQLI_ASYNC Constant

The MYSQLI_ASYNC constant is used as an optional parameter in the mysqli_query() function. It allows the query to be executed asynchronously, meaning that the PHP script does not wait for the results, but immediately proceeds with executing the next line of code.

EXAMPLE
RESULT
The result will be displayed here...

Practical use: This is extremely useful when you have long-running queries (e.g., generating reports) but still want to display the rest of the web page to the user as quickly as possible. The results of such a query are fetched later using the reap_async_query() method.