I'm currently working on a project where I need to set MySQL variables using MySQLi, not PHP variables. I've been trying to find a solution, but I haven't had much luck so far.
To provide some context, I have a PHP script that connects to a MySQL database using MySQLi. Within this script, I need to set a few MySQL variables like "max_allowed_packet" and "wait_timeout" before executing my queries.
I know how to set these variables using regular SQL queries, but I specifically need to achieve this using MySQLi. I want to ensure that the changes I make to these variables are applied only to the current MySQLi connection and not affect other connections to the same database.
I've tried searching online, but most of the examples I found were related to using PHP variables to set MySQL variables, which is not what I need.
If anyone has any experience or knowledge on how to accomplish this task using MySQLi, I would greatly appreciate your assistance. Any guidance or example code would be extremely helpful.
Thank you all in advance for your help!