MYSQL可与图像一起使用吗? [英] MYSQL works with Images?
问题描述
如何在MySQL数据库中存储多个图像并在需要时回调它们?我需要存储人物及其图片的多个数据,以便在我的网站上运行个人资料.请帮忙.
How to store multiple images in a MySQL database and call them back whenever need? I need to store multiple data of people and their pictures for profile functioning on my website. Please help.
更新的问题
P. S.- 我知道有一种在文件系统上存储文件的解决方案.但是我想知道在数据库上存储它的过程.因此,请帮助我,而不要给出抽象的答案.
推荐答案
我也将回答这样做不是一个好主意...
I also will answer that is not a good idea to do so...
使用BLOB列类型可以做到这一点,在上载函数中,您必须将其作为$ _FILES ['uploaded_file'] ['name']
by the way you can do it using BLOB column type and in the upload function you have to insert it into the query as $_FILES['uploaded_file']['name']
例如:
INSERT INTO db_table (id, image) VALUES (NULL, '{$_FILES['userfile']['name']}');
这篇关于MYSQL可与图像一起使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!