I'm having a problem with extracting fields from an SQL Server database. I've tried to find a reason on many websites to no luck. If anyone can help, I would truly be grateful.
CODE: (I have $connection establesed earlier)
$query = "SELECT department_label FROM departments";
$run = odbc_exec($connection,$query);
while(odbc_num_rows($run)){
$myarray[] = odbc_fetch_array($run);
}
foreach($myarray as $options)
{ print ("$options <br>"); }
OUTPUT: (there are eight records in the table I'm accessing)
Array
Array
Array
Array
Array
Array
Array
Array