RayPooley
As @pbismad pointed out, it has nothing to do with the driver.
But if you name a result column RefName then it's going to be called RefName in the array, not refname. Those are different strings with different values and would be different keys in an array. It has nothing to do with the database.
$array['refname' => 17, 'RefName' => 42];
echo $array['refname'],"\n";
echo $array['RefName'],"\n";
echo $array['REFNAME'], "\n";
You can see this in your own code if you look at the entire row that is retrieved:
<?php
$query = "select top 5 RefName from AvailableReferences;";
$stmt = $conn->query($query);
while ( $row = $stmt->fetch() ){
var_dump($row);
}
echo "<br />";
$stmt = $conn->query($query);
while ( $row = $stmt->fetch() ){
var_dump($row);
}
?>
(Note that you really only need one of those because now both queries and both loops are identical.)