For some reason I cant retrieve data from a query to a username with accent marks, but the same data retrieving works perfectly if the user has no accent marks.
This is the PHP query:
$query = "SELECT * FROM [dbo].[Users] WHERE User= 'Róger'";
$result = sqlsrv_query($conn, $query);
$row = sqlsrv_fetch_array($result);
$UserID = $row['ID'];
echo "ID is: " . $UserID;
This is my result on website:
ID is:
This is what i get from var_dump($query);
"SELECT * FROM [dbo].[Users] WHERE User= 'Róger'"
Now, if we change $query from
$query = "SELECT * FROM [dbo].[Users] WHERE User= 'Róger'";
to
$query = "SELECT * FROM [dbo].[Users] WHERE User= 'Robert'";
Then it properly shows up the UserID.
Any ideas?