Jump to content

General Question


jamesjmann

Recommended Posts

Is it better to store actual image data in Mysql or just the url to the image on your server?

 

I currently just store the url so when I display images on my page, I do something like this:

<a href="$url"><img src="$url"></a>

 

Does anyone know which method big sites like Facebook uses? I'm trying to figure out which method is best, because I'm currently designing a social networking site, and of course, finding a suitable method of storing user data such as this is integral.

Link to comment
https://forums.phpfreaks.com/topic/228644-general-question/
Share on other sites

that question borders on the phylosophical as far as database storge goes.  Personaly I would do as you are doing, blobs can be a bit messy at times when it comes to formating the data return.  Also, I am under the impression that you can get better compression on the raw file than you can on a blob entry.

 

Just my two pence worth, like I said, you'd have been as well asking for the meaning of life  ;D

Link to comment
https://forums.phpfreaks.com/topic/228644-general-question/#findComment-1178892
Share on other sites

that question borders on the phylosophical as far as database storge goes.  Personaly I would do as you are doing, blobs can be a bit messy at times when it comes to formating the data return.  Also, I am under the impression that you can get better compression on the raw file than you can on a blob entry.

 

Just my two pence worth, like I said, you'd have been as well asking for the meaning of life  ;D

 

lol. is that how websites like facebook does it?

Link to comment
https://forums.phpfreaks.com/topic/228644-general-question/#findComment-1178897
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.