I have stored several images in mediumblob type on a SQL database , I have tired following code but it gives ASCII characters instead of images
while($obj = $results->fetch_object())
{
echo ' <div class="col-md-3"> ';
echo ' <h2>'.$obj->name.'</h2>';
echo ' <img src=Image/'.$obj->pic.' />';
echo ' <div class="row">'.$obj->price.'</div>';
echo ' </div> ';
}
how do I change this to appear an image?
echo ' <img src=Image/'.$obj->pic.' />';
I know it's not a good practice to store images inside databases.