0

This query works normally on windows but on linux it inserts "???". Both use same database engine sql server.

On Linux i use freetds dblib to connect mssql db.

Php version

7.2

Freetds options

client charset = UTF-8
tds version = 8.0

Query

$query = $pdo->prepare("INSERT INTO subjects(name,tenant_id) values(:name, :tenant_id)");
$query->bindValue('tenant_id', 1, PDO::PARAM_INT);
$query->bindValue('name', 'əəƏ', PDO::PARAM_STR);
$query->execute();
  • 1
    See "question mark" in https://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored – Rick James May 10 '18 at 03:25
  • Thanks dude, i eventually found the problem. But i can't answer my own question. It was dblib problem , I changed it to sqlsrv then the problem was solved. – Terlan Abdullayev May 10 '18 at 09:04
  • Yes, one can Answer one's own Question. (But perhaps not now that it is a "duplicate".) – Rick James May 10 '18 at 13:50

0 Answers0