The mysqli_get_warnings() function returns an object containing warnings that occurred during the
execution of the last query. This is crucial for detecting issues such as incorrect data types or truncated text
that do not stop the script execution.
Practical use: If a query returns a warning (e.g., when dividing by zero or converting strings), you can use this function to output the error code and message. Look at the example: