• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Mysql table rows show as questionmarks

New Here ,
May 11, 2010 May 11, 2010

Copy link to clipboard

Copied

Hi guys,

I'm trying to display the rows of my database table in a datagrid, but as their names are written in bulgarian they appear as questionmarks. Any tips on how I can fix this?

Thanks in advance

Views

401

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 16, 2010 May 16, 2010

Copy link to clipboard

Copied

I figured it out myself... Just wanted to post the solution if anybody has the same

problem. I had a php script that I used to populate a data grid. Here is the code with the line I had to add to make the table names appear normally:

<?PHP

class PlayersService {
public function getPlayers()
{
  $connection = mysqli_connect("host", "username", "password", "db") or die(mysqli_connect_error());
  mysqli_query($connection, "SET CHARACTER SET utf8");
  $sql = "SELECT * FROM players";
  $result = mysqli_query($connection, $sql) or die("Query failed: " . mysqli_error($connection));
  $rows = array();
  while ($row = mysqli_fetch_object($result))
  {
   $rows[] = $row ;
  }
  return $rows;
}

}

?>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 27, 2011 Aug 27, 2011

Copy link to clipboard

Copied

LATEST

Thank you man! that really helped!!!!

and kudos for posting yourself just to help others with the same problem

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines