Como lidar com strings complicadas no PHP
Publicado por Cézar Augusto em 15/04/2020
[ Hits: 1.886 ]
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)";
Como verificar senha no shell script
Partições BTRFS Nativamente no Windows
Servidor web simples sem instalar nada
Como verificar a integridade das stock ROMs da Samsung
Descobrir a senha do PHPMyAdmin
Suporte PHP5 oci8 no Oracle 11g - Ubuntu 8.04 Server
Geração automática de menu drop down com banco de dados em PHP
Como ver a saída de qualquer comando MySQL no PHP
A combinação de WMs com compositores feitos por fora
Audacious, VLC e QMMP - que saudades do XMMS
SUNO OpenSource: Crie um servidor de gerador de música com IA
Instalação Completa e Configuração Básica do Void Linux
A Fundação da Confiança Digital: A Importância Estratégica de uma PKI CA na Segurança de Dados
Instalar o Microsoft Teams no Ubuntu e Derivados
Script para configurar o DOOM Retro no Linux
Script para organizar janelas em cascata no KDE Plasma 6 (Wayland)
Erro ao baixar progamas no terminal (1)
Instalador não reconhece SSD Sata. (8)









