Got solution with sqlsrv
driver ;)
function GetLogoById($Id)
{
$serverName = "XXXXX";
$uid = "XXXXXX";
$pwd = "XXXXXX";
$connectionInfo = array( "UID"=>$uid,
"PWD"=>$pwd,
"Database"=>"XXXXXX");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
$tsql = "select Logo from TableName where Id = '$Id'";
$stmt = sqlsrv_query( $conn, $tsql);
if( $stmt === false)
{
echo "Error in query preparation/execution.\n";
die( print_r( sqlsrv_errors(), true));
}
/* Retrieve each row as an associative array and display the results.*/
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC))
{
return $row;
}
/* Free statement and connection resources. */
sqlsrv_free_stmt( $stmt);
sqlsrv_close( $conn);
}