I'm testing the targeting of images with the URL. But during the tests, the URL was returned with changes as seen below:
URL entered in the database:
http://www.meusite.com.br/pastaimagem/logos/imageLogo.jpg
URL returned by the bank:
http:\/\/www.meusite.com.br\/pastaimagem\/logos\/imageLogo.jpg
I noticed this problem while testing the query by the browser.
PHP version:
PHP: 5.4.37
Query used to enter URL:
UPDATE 'meusite_sitebd'.'jump' SET 'urlimagem' = 'http://www.meusite.com.br/pastaimagem/logos/imageLogo.jpg' WHERE 'register'.'idRegistro' =1;
PHP code used to perform the request:
<?php
include 'conexao.php';
//Converte para UTF8 os resultados da query
mysql_set_charset('UTF8');
// Retorna registro por id
$id = $_GET['idRegistro'];
$sql = "SELECT * FROM registros WHERE idRegistro = '$id'";
$resultado = mysql_query($sql) or die ("Erro: ".mysql_error());
// Crinha variável linha do tipo array
$linha = array();
while($r = mysql_fetch_assoc($resultado))
{
$linha [] = $r;
}
echo json_encode($linha);
mysql_close();
?>
As you can see, it's a very simple code.