1

I do execute a SQL string via PHP.

SELECT *
FROM dDokumente
WHERE dMandant = '26'
AND dName LIKE '%wäsche%'
AND dActive = '1'
ORDER BY dDokID

if I execute it via PHP MyAdmin I get 2 results (which is correct) but as soon as I execute it via my PHP page it shows 0 results.

MySql Database is UTF8_general_ci.

The SQL string seems to be correct if I display it on the page.

Does anyone have an idea what I could do?

Bhargav Rao
  • 45,811
  • 27
  • 120
  • 136
tpensel
  • 19
  • 6

1 Answers1

0

Make sure everything is UTF-8.

Open your PHP script in your IDE, and check the file encoding is also set to UTF-8.

In windows, you'll probably be on windows-1252 or iso-8559-1 (AVOID!)

Also, if it's on a web page, make sure your HTML also declares the file encoding as utf-8 in the meta tags

delboy1978uk
  • 11,504
  • 2
  • 18
  • 37