I have this issue with a PHP script when querying a mysql DB.
The query is:
SELECT COUNT(*) FROM theTable WHERE fieldValue = ‘Dom-Rémy'
I have checked that when performing by hand this query in the administration console (phpMyAdmin) I can find one record matching the request, which is what I expect.
But inside a PHP script where the code is as follows, I always get 0 records (instead of 1):
$Query = "SELECT COUNT(*) FROM theTable WHERE fieldValue = 'Dom-Rémy'";
$DBR = mysql_query($Query,$Connection);
$NBR = mysql_result($DBR,0,0);
printf("NBR: %d\n",$NBR);
Why is that? I suspect the european character inside the fieldValue is what causes the problem, but what should I do to make it work?