How to display an BLOB image stored in MySql database?

前端 未结 4 2111
孤城傲影
孤城傲影 2020-11-30 11:56

I am trying to display the last 5 images uploaded to my \"store\" table in MySql. I\'m a complete noob to PHP and databases and i\'ve been reading a lot on how to do this bu

4条回答
  •  遥遥无期
    2020-11-30 12:24

    This is what I used when I wanted to do something like that... a long time ago! =P

    $sql = "SELECT image FROM table WHERE cond ORDER BY xxxx DESC LIMIT 5";
    $result = mysqli_query($db,$sql);
    while($arraySomething = mysqli_fetch_array($result))
    {
        echo "";
    }
    

提交回复
热议问题