ODBC and PHP bringing string results with formatting problem

Asked

Viewed 14 times

1

This is the result: The result of the name has no accent

inserir a descrição da imagem aqui

The code works on my machine, but on the server this problem.

 <?php 
 $con1=odbc_connect('***','***','***');
        $sql = "  SELECT *
                  FROM tabela
                  WHERE matricula = 3050";

$res = odbc_exec($con1, $sql);
while (odbc_fetch_row($res)) {
$nome = (odbc_result($res, 'xxx'));
$matricula = (odbc_result($res, 'xxx'));
}

echo 'Nome: '.$nome .'<br>Matricula: '.$matricula;

1 answer

1

I managed to solve using

$con1=odbc_connect('***','***','***', SQL_CUR_USE_ODBC);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.