简体   繁体   English

从MySQL以编程方式从URL获取图像

[英]Get image from URL programmatically from MySQL

I need to get an image by a url that i create from a couple of fields in my MySQL database. 我需要通过我在MySQL数据库中的几个字段创建的URL获取图像。 So, i get two fields: 'id' & 'placeID' and I do this command: 所以,我得到两个字段:'id'和'placeID',我执行此命令:

select concat('http://whatever.come?id=',
              cast(Votis.SequencialDoCandidato as char),
              '&placeID=',
              cast(IDUnidadeEleitoral as char))
from database.table;

This URL points to a picture. 此URL指向图片。

So my questions is: 'Is there anyway of insert automatically the picture that this URL brings into a image field? 所以我的问题是:'无论如何都有自动插入此URL带入图像字段的图片?

不,这是不可能的,无论如何都是一个非常可怕的组合,因为检索URL不是数据库的工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM