PHP Code:
function pathFind(/*parameters*/)
{
$db = new DB();
$dbq = $db->DBcon();
// query here.
$stmt = $dbq->prepare($query);
$stmt->bind_param(/*parameters*/);
$stmt->execute();
$stmt->bind_result(/*parameters*/);
while($stmt->fetch())
{
pathFind(/*variables*/); <----- recursion here.
}
}
So here. Do I still need to close my connections even PHP can do it for me? I'm just worried that I exceed the connection limit because my function is in recursion.
And when I attempt to close, I receive a warning: Couldn't fetch mysqli.