Good afternoon everyone! I would like some help from you to solve a problem that is happening to me. I have a hexadecimal string containing an image that should be added to the database, when I insert it with the PDO without the bindValue, passing the value of the variable directly to the SQL string, works perfectly:
$sql = "INSERT INTO arquivos (arquivo) Value($this->Arquivo)";
try{
$stmt = $this->db->prepare( $sql );
//outros campos...
$stmt->execute();
}...
However, if I do via bindValue:
$sql = "INSERT INTO arquivos (arquivo) Value(:Arquivo)";
try{
$stmt = $this->db->prepare( $sql );
$stmt->bindValue( ':Arquivo', $this->Arquivo );
$stmt->execute();
}...
The value is trimmed, and the image becomes corrupted.
How do I fix this? Is it any configuration? I would like to use everything via bindValue.