<?php
$sql = utf8_decode("SELECT Photo,Code_Musicien FROM Musicien WHERE Code_Musicien=?");
try {
$stmt = $db->prepare($sql);
$stmt->execute(array($_GET['image']));
$stmt->bindColumn(1, $lob, PDO::PARAM_LOB);
} catch (PDOException $e) {
echo "Data could not be retrieved from the database." . $e->getMessage();
}
$stmt->fetch(PDO::FETCH_BOUND);
if (is_string($lob)) {
$lob = fopen('data://image/jpeg;base64,' . base64_encode($lob), 'r');
}
fpassthru($lob);
&GT;