Will mysqli connection close function explicitly close statement
Say I have a code like this
new mysqli($host , $userName , $password , $database)
$stmt = $mysqli->prepare("INSERT INTO MY_TABLE (COLUMNS.....) VALUES (......)");
// Other processing
$stmt->close(); // DO I HAVE TO INVOKE THIS EXPLICITLY?
$mysqli->close(); // OR WILL THIS CLOSE THE $stmt
You don’t need neither. As long as you don’t experience issues – don’t do unnecessary work and let php do it for you