I am using ODBC to make queries in an Access Database along with php the problem is: I have a field in the BD with accent in this case the column is called contactode in it I have the option FLOOR , TELEPHONE and SERVICE when I make my query with FLOOR AND SERVICE there is no problem but when I want to ask for PHONE strong> does not work Any ideas (both in the code and in the BD are exactly the same with the accent) (I have Office 2016 if it influences something).
<?php
header('Content-Type: text/html; charset=UTF-8');
# connect to a DSN "mydb" with a user and password
$connect4 = odbc_connect("proyecto", "usuario", "contra") or die("Error
Connect to Database");
$query4 = "SELECT sum (IIF([contactode] = 'TELEFÓNICO',1,0))
FROM datos
WEHRE datos.fecha_reg >= #$newDate1# and
datos.fecha_reg <= #$newDate2# and
vendedor <> 'CASA'
GROUP BY vendedor
ORDER BY vendedor";
# perform the query4
$result4 = odbc_exec($connect4, $query4);
# fetch the data from the database
while(odbc_fetch_row($result4)){
$d1 = round ($d1 = odbc_result($result4, 1));
$sumatoria += $d1;
print("<tr><td>$d1</td></tr>");
}
print("<td> $sumatoria</td>");
# close the connection
odbc_close($connect4);
}
?>