E
E
Evgeny Blinkov2019-02-19 17:28:11
Character encoding
Evgeny Blinkov, 2019-02-19 17:28:11

I read from the database and write again the text in Russian. Result - ???. What can be wrong?

I do it like this:

$rez_products = $parser_mysqli->query('
  SELECT * 
  FROM `'.CATS_TABLE.'` 
  WHERE 1
');
while($link = $rez_products->fetch_object())
{
  //echo $link->name.'<br>';
  var_dump($parser_mysqli->query('
    UPDATE `'.CATS_TABLE.'` 
    SET `name` = "'.$link->name.'"
    WHERE id = "'.$link->id.'"
  '));
}

As a result, there are question marks in the name field in the database. What can be wrong? I guess it's in encodings, but what exactly?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question