0

Whenever a field in that particular row contains characters like á à é è ü etc it returns null.

Whenever I execute the query in phpmyadmin it works fine so I am guessing it has something to with mysqli?

$results = mysqli_query($mysqli, "SELECT ea_id, nationid, firstname, lastname, commonname, rating FROM players WHERE commonname LIKE '%test%' OR firstname LIKE '%test%' OR lastname LIKE '%test%'");

$record = mysqli_fetch_assoc($results);
print_r($record);
Dharman
  • 30,962
  • 25
  • 85
  • 135
user2001411
  • 51
  • 1
  • 2
  • 7
  • 1
    accepting answers show other users that your question has been answered and makes it easy for them to find the correct solution. – deW1 Jan 10 '14 at 22:37

1 Answers1

1
$mysqli->set_charset("utf8")

should fix your problem.

Also check your page header & database for utf8 encoding.

deW1
  • 5,562
  • 10
  • 38
  • 54