Answer the question
In order to leave comments, you need to log in
How to send binary data using pdo_dblib?
php 5.6 \ pdo_dblib \ freetds
If this was a SQLSRV Windows driver, then using the PDO::SQLSRV_ENCODING_BINARY constant, the type is quite successfully specified and the data is sent.
$stmt = $conn->prepare("EXEC proc @fileData = ?");
$stmt->bindParam(1, $fileData, PDO::PARAM_LOB, 0, PDO::SQLSRV_ENCODING_BINARY);
$stmt->execute();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question