2014-11-19 13:45

使用Navicat Premium在MySQL中存储图像链接


I'm designing a dynamic website with Joomla and my PHP part is handled by Dreamweaver.

I'm using Navicat Premium to build my database.

One raw (varchar) in my database contains images. I found that having images as BLOBS in database is not a good idea.

But, Linking the image as /img/image.php in the cell is not working.

Actually I'm using Dreamweaver to fetch database table to the result page.

Please help me in-

  1. Inserting the image link to the cell via Navicat Premium.
  2. Any modifications I should do in Dreamweaver after inserting the proper link in the cell.


Screenshot of result page

Screenshot of result page

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • dtrhd2850 dtrhd2850 7年前

    The problem is, you are mixing the Address and image. You have several option. Let's create an image field in your database, and when you loop through your records, check, is the image field is not empty, and if it's not, then show the image by: <img src="PATH OF IMAGE COMES HERE" alt="" /> in your case <img src="/images/image.png" alt="" />

    With your current design of your table, somehow you need to decide, is it an image, or is it an Address. Because if you just loop through your recordset, then there will be: <img src="London" alt="" />, and London is not a valid image resource.

    点赞 评论 复制链接分享