I have this problem with a PHP script while querying mysql DB.
Request:
SELECT COUNT(*) FROM theTable WHERE fieldValue = 'Dom-Rémy'
I checked that when I manually execute this request in the administration console (phpMyAdmin), I can find one entry that matches the request, and this is what I expect.
But inside a PHP script, where the code looks like this, I always get 0 entries (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? I suspect that the European character inside the fieldValue is causing the problem, but what should I do to make it work?
source share