Como lidar com strings complicadas no PHP
Publicado por Cézar Augusto em 15/04/2020
[ Hits: 1.795 ]
Blog: https://www.cezarcampos.com.br/
<?php
public function insert(Bill $bill, int $user_id) : bool
{
$link = $this->link;
$billetBanking = $link->real_escape_string($bill->getBilletBanking());
$sql = "INSERT INTO `bill` (`description`, `price`, `expirationDate`, `barCode`, `billetBanking`, `paid`) ".
"VALUES ('".$bill->getDescription()."', '".$bill->getPrice()."', '".$bill->getExpirationDate()."', '".$bill->getBarCode()."', ".
"'".$billetBanking."', CONV('0', 2, 10) + 0)";
$link->query($sql);
return $this->addRelation($user_id);
}
?>
<?php
$msg = "
O
l
a
m
u
n
do";
echo $msg;
// Vai imprimir
// O l a m u n do
?>
$sql = "INSERT INTO `bill` (`description`, `price`, `expirationDate`,
`barCode`, `billetBanking`, `paid`)
VALUES ('{$bill->getDescription()}', '{$bill->getPrice()}',
'{$bill->getExpirationDate()}', '{$bill->getBarCode()}', '{$billetBanking}',
CONV('0', 2, 10) + 0)";
$sql = "INSERT INTO `bill` (`description`, `price`, `expirationDate`, `barCode`, `billetBanking`, `paid`) ".
"VALUES ('".$bill->getDescription()."', '".$bill->getPrice()."', '".$bill->getExpirationDate()."', '".$bill->getBarCode()."', ".
"'".$billetBanking."', CONV('0', 2, 10) + 0)";
Servidor web simples sem instalar nada
Tema escuro no Elementary sem programas
Configurando o phpMyAdmin para acessar o MySQL remotamente
Mensagem de erro: "PHP Fatal error: Call to undefined function pg_connect()" [Resolvido]
Mostrar os campos de uma tabela do PostgreSQL com PHP
Geração automática de menu drop down com banco de dados em PHP
Como atualizar sua versão estável do Debian
Cirurgia para acelerar o openSUSE em HD externo via USB
Void Server como Domain Control
Quer auto-organizar janelas (tiling) no seu Linux? Veja como no Plasma 6 e no Gnome
Copiando caminho atual do terminal direto para o clipboard do teclado
Script de montagem de chroot automatica
Não consigo instalar distro antiga no virtualbox nem direto no hd (33)
resolvido / thorium browser no ubuntu (3)









