I have the following PHP snippet:
function getFacilities($testName, $dbAdapter) {
$sql1 = "SELECT * FROM facilities_db WHERE facility_name = '$testName'";
$result1 = $dbAdapter->query($sql1);
$facility_details = array();
while ($row = mysqli_fetch_assoc($result1))
{
$facility_details[] = $row;
}
return $facility_details;
}
$testName = "Abraham Moss Leisure";
$facility_data = getFacilities($testName, $mysqli);
The value of $testName is arbitrary just for testing purposes. This is the function from one of the answers, but my the only difference in my initial definition was not having $dbAdapter as a parameter.