RE: IMAGES/PICTURES-MYSQL
Hi! I have seen in this page http://www.blobstreaming.org/ but i think that it´s quite difficult. I want to put only the url of the image, and as you said the pictures o images might be in the server folder, but what is the folder? Thanks. -- View this message in context: http://www.nabble.com/IMAGES-PICTURES-MYSQL-tf4845682.html#a13923823 Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: IMAGES/PICTURES-MYSQL
Hello! I have tried the instructions that you explain to me. I have read also some issues but doens´t work. So i have done: ui:tableColumn binding=#{STOCKSOC.tableColumn6} headerText=image id=tableColumn6 sort=producto.image ui:imageHyperlink action=#{STOCKSOC.imageHyperlink1_action} binding=#{STOCKSOC.imageHyperlink1} id=imageHyperlink1 imageURL=C:\Documents and Settings\Ibai Leizea\Escritorio\gsg\SociedadGastronomica\web\IMAGES\im?imageid=#{currentRow.value['producto.id_prod']} text= url=C:\Documents and Settings\Ibai Leizea\Escritorio\gsg\SociedadGastronomica\web\IMAGES\im?imageid=#{currentRow.value['producto.id_prod']}/ /ui:tableColumn http://www.nabble.com/file/p13894350/1.jpg http://www.nabble.com/file/p13894350/2.jpg http://www.nabble.com/file/p13894350/3.jpg I don´t know if my proyect is in the correct path (C:\Documents and Settings\Ibai Leizea\Escritorio\gsg\SociedadGastronomica\) or the images (C:\Documents and Settings\Ibai Leizea\Escritorio\gsg\SociedadGastronomica\web\IMAGES). I have also proved copying the IMAGE folder in other path, but it doesn´t work. I don´t know specifically which is the server path. Thanks to everybody! Ibai -- View this message in context: http://www.nabble.com/IMAGES-PICTURES-MYSQL-tf4845682.html#a13894350 Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: IMAGES/PICTURES-MYSQL
Hi, I have read some messages about this topic but i haven´t resolved my problem yet. I am using mySQL Query Browser to make de schema. And i have a table (product) where there are some attributes (producto, precio, nUds,tipo)(spanish). All are relationated with one product (ex: heineken beer). So, i want to put another atribute image where i can put the image of all the products. But i have read that is imposible, that i have to put the path of the jpeg or gif, but i don´t know how. If anyone could help me i will be grateful. Attached is the image of my DB: What makes you think it's impossible to store the actual image inside a blob field? Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: IMAGES/PICTURES-MYSQL
Hello! I have read that. But i have not idea what i have to do. Because i´m amateur in this topic. Thank you -- View this message in context: http://www.nabble.com/IMAGES-PICTURES-MYSQL-tf4845682.html#a13865352 Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: IMAGES/PICTURES-MYSQL
It all comes down to what you are most comfortable with. What I have done is to name each image file with a serial number (1.jpg, 2.gif, 3.png, ...) and store the path along with the real name of the image in a table row. Doing it this way means that you don't need to program logic to convert a blob in order to serve it up with a script, you just need to programmatically create a link to the image file and let the web server do it. I find that easier to work with, and certainly easier to debug. Regards, Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com -Original Message- From: puntapari [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 20, 2007 3:38 PM To: mysql@lists.mysql.com Subject: Re: IMAGES/PICTURES-MYSQL Hello! I have read that. But i have not idea what i have to do. Because i´m amateur in this topic. Thank you -- View this message in context: http://www.nabble.com/IMAGES-PICTURES- MYSQL-tf4845682.html#a13865352 Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] infoshop.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Images to MySql Database in PHP or JAVA
Hi, Have you try google ? http://www.google.fr/search?hl=frq=storing+image+in+mysqlbtnG=Recherche+Googlemeta= I see pretty much a lot of stuff there ;) btw, storing image in a table in considering a bad practice, let the filesystem handle it it does it more efficiently. I would suggesdt to write the image on the disk, and then store the path in you db with useful thing like image format, width, height, etc... HIMH. Christopher Molnar wrote: Hello list- I am programing both in Java and PHP. Can anyone point me to sample code for either on saving an image to a table? Thanks, -Chris -- Philippe Poelvoorde COS Trading Ltd. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Images to MySql Database in PHP or JAVA
Dear member,you can visit: http://dev.mysql.com/doc/connector/j/en/index.html http://dev.mysql.com/doc/mysql/en/php.html Hello list- I am programing both in Java and PHP. Can anyone point me to sample code for either on saving an image to a table? Thanks, -Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: images from MySQL backend used with MS-Access 2000 frontend
I would recommend storing the images on the filesystem and put the information about those images (along with the path to the image) in MySQL. If you plan to have lots of images, implement a nice logical directory structure to keep them in as in my experience linux ext2/3 is fast reading/writing files in that scenario and can be slow in retrieving files in a single directory containing large amounts of files. Cheers, Andrew -Original Message- From: Yuri Oleynikov [mailto:[EMAIL PROTECTED] Sent: Sunday 01 February 2004 16:33 To: [EMAIL PROTECTED] Subject: images from MySQL backend used with MS-Access 2000 frontend Hi everyone, I am new to MySQL. I am starting a database project for a medium-sized medical office. I chose MS-Access (on 10-terminal pre-existing Win2K intranet) for rapid front-end dev and familiarity to the existing users. I plan to use MySQL on Linux server for backend for its speed, great support and ease of use. The database will consist of doctor's reports, schematic drawings and photos (500K JPGs and 50K PICTs). I am planning to implement that with BLOB or, alternatively, with file system while storing links to files. Later we may add webaccess through MySQL webserving or by using Access webserving options. Has anybody done anything similar? What is the best way to implement image storage (and, in future, movies, maybe)? Thanks a lot. yuri. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: images from MySQL backend used with MS-Access 2000 frontend
Read this article for it's design on database storage.. I have several big implementations on this design which are fast, reliable and scalable (one of them in the medical field aswell) http://php.dreamwerx.net/forums/viewtopic.php?t=6 On Sun, 1 Feb 2004, Yuri Oleynikov wrote: Hi everyone, I am new to MySQL. I am starting a database project for a medium-sized medical office. I chose MS-Access (on 10-terminal pre-existing Win2K intranet) for rapid front-end dev and familiarity to the existing users. I plan to use MySQL on Linux server for backend for its speed, great support and ease of use. The database will consist of doctor's reports, schematic drawings and photos (500K JPGs and 50K PICTs). I am planning to implement that with BLOB or, alternatively, with file system while storing links to files. Later we may add webaccess through MySQL webserving or by using Access webserving options. Has anybody done anything similar? What is the best way to implement image storage (and, in future, movies, maybe)? Thanks a lot. yuri. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: images with mysql
sure you can. And i don't mind you disagreeing with me either =) Although, if the solution/site is meant to be used by other than people who know something about the webserver i don't think it's a good solution. I can imagine writing something that reads the htaccess-file and edits it... but i don't like the possible securtyissues with that. Besides... if you render a page with a selectbox from mysqltables and another with images and let the user match them together, it's idiotproof =) If you have a php(or whatever)-file wich sole purpouse is to check users rights and render images it can also always check if you have the right cookies. If you've been to the right previous page to see that picture, if not redirect to '/'; Do you get my point? I still believe that the blob i my saviour... (despite the obvious loss of performance) On Thu, 20 Mar 2003, B. van Ouwerkerk wrote: You can use other ways to protect your images from linking by others. Like with Apache and htaccess.. I don't agree with you on your opinion that it's easier to code. If you insert a link into your database all you have to do is retrieve it and push the link to the browser. B. At 20:18 20-03-2003 +0100, lasse wrote: hey all.. new to the list. Just my 5 cents... I think it's better to store images in the database, sure you loose a bit in performance, but it's easier to code. The way i've done it before is always a separate render.php (or what ever) that compares the users rights to view that image, get's the blob from the database, sets right content-type for the page and then renders the binary data. That way... you can control frames/design (direct links to images can be avoided) und so weiter... //lars On Thu, 20 Mar 2003, B. van Ouwerkerk wrote: I assume it is, have not tested it.. If you need to fetch the files from the database your app needs to wait until it has recieved the data. If you only store name/path info it will take less time to fetch the data, ship it off to the browser which can start fetching the images without connecting to the database again. Sounds pretty logical.. and it gets worse if your site is hosted by an ISP who is using a database server running on a seperate box.. B. At 21:35 20-03-2003 +, Lai Liu-yuan wrote: Well, this may be off topic. In my case, I store tens of thousands of images, gradually growing. All of them are quite small, most around 30*30 gray scale. Would it still be faster to store them on disk? On Thu, 20 Mar 2003 13:57:06 +0100 B. van Ouwerkerk [EMAIL PROTECTED] wrote: IMHO it's better to store a link. I have seen databases (not MySQL) getting corrupted because the file inserted was to big. For the visitor it doesn't really matter whether you put it into the database or not. A link is less difficult and you don't have to retrieve pictures from the database so it might be quicker.. B. At 18:34 20-03-2003 +, Lai Liu-yuan wrote: I am now having a database storing images of chinese characters for research purpose. I wrote a program to store and retrieve them. My images are of type ppm. This is how I designed my table: mysql describe poor; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+ | cc | char(2) binary | | | | | | width | int(1) | YES | | NULL| | | height | int(1) | YES | | NULL| | | data | blob | YES | | NULL| | +++--+-+-+---+ Just have to be really careful in storing binary data. Hope this help. On Thu, 20 Mar 2003 10:34:19 +0100 [EMAIL PROTECTED] wrote: Hi! I have a problem with my MySQL I need to have some a images related with an item for example -- ! author ! date of birth an death ! image! -- How can I define the field for the images? I have read that LONGBLOB could be useful for large objct like images, but I can't understand how to set it in my database... Thank you in advance stefano -- S t e f a n o C a r d o Debian GNU-Linux user - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED]
RE: images with mysql
Don't forget that the images can be stored *outside* the root dir. Access them using ../../ until you reach your img dir. There's no way to get to the images directly then. Paul -Original Message- From: lasse [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 12:14 AM To: unlisted-recipients:; no To-header on input Cc: [EMAIL PROTECTED] Subject: Re: images with mysql sure you can. And i don't mind you disagreeing with me either =) Although, if the solution/site is meant to be used by other than people who know something about the webserver i don't think it's a good solution. I can imagine writing something that reads the htaccess-file and edits it... but i don't like the possible securtyissues with that. Besides... if you render a page with a selectbox from mysqltables and another with images and let the user match them together, it's idiotproof =) If you have a php(or whatever)-file wich sole purpouse is to check users rights and render images it can also always check if you have the right cookies. If you've been to the right previous page to see that picture, if not redirect to '/'; Do you get my point? I still believe that the blob i my saviour... (despite the obvious loss of performance) On Thu, 20 Mar 2003, B. van Ouwerkerk wrote: You can use other ways to protect your images from linking by others. Like with Apache and htaccess.. I don't agree with you on your opinion that it's easier to code. If you insert a link into your database all you have to do is retrieve it and push the link to the browser. B. At 20:18 20-03-2003 +0100, lasse wrote: hey all.. new to the list. Just my 5 cents... I think it's better to store images in the database, sure you loose a bit in performance, but it's easier to code. The way i've done it before is always a separate render.php (or what ever) that compares the users rights to view that image, get's the blob from the database, sets right content-type for the page and then renders the binary data. That way... you can control frames/design (direct links to images can be avoided) und so weiter... //lars On Thu, 20 Mar 2003, B. van Ouwerkerk wrote: I assume it is, have not tested it.. If you need to fetch the files from the database your app needs to wait until it has recieved the data. If you only store name/path info it will take less time to fetch the data, ship it off to the browser which can start fetching the images without connecting to the database again. Sounds pretty logical.. and it gets worse if your site is hosted by an ISP who is using a database server running on a seperate box.. B. At 21:35 20-03-2003 +, Lai Liu-yuan wrote: Well, this may be off topic. In my case, I store tens of thousands of images, gradually growing. All of them are quite small, most around 30*30 gray scale. Would it still be faster to store them on disk? On Thu, 20 Mar 2003 13:57:06 +0100 B. van Ouwerkerk [EMAIL PROTECTED] wrote: IMHO it's better to store a link. I have seen databases (not MySQL) getting corrupted because the file inserted was to big. For the visitor it doesn't really matter whether you put it into the database or not. A link is less difficult and you don't have to retrieve pictures from the database so it might be quicker.. B. At 18:34 20-03-2003 +, Lai Liu-yuan wrote: I am now having a database storing images of chinese characters for research purpose. I wrote a program to store and retrieve them. My images are of type ppm. This is how I designed my table: mysql describe poor; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+ | cc | char(2) binary | | | | | | width | int(1) | YES | | NULL| | | height | int(1) | YES | | NULL| | | data | blob | YES | | NULL| | +++--+-+-+---+ Just have to be really careful in storing binary data. Hope this help. On Thu, 20 Mar 2003 10:34:19 +0100 [EMAIL PROTECTED] wrote: Hi! I have a problem with my MySQL I need to have some a images related with an item for example -- ! author ! date of birth an death ! image! -- How can I define the field for the images? I have read that LONGBLOB could be useful for large objct like images, but I can't understand how to set it in my database... Thank you in advance stefano -- S t e f a n o C a r d o
Re: images with mysql
Not an issue since you don't need to edit the htaccess file for every file. You set it for the whole directory. The only reason for preventing ppl to access files would be theft of bandwith. If you worry about ppl being able to get the images then you shouldn't publish them at all. You can't protect them from being dumped with printscreen. Another solution would be to change the the path at random and copy all images to the new location while you copy a special image on the old location. You have no idea how fast ppl will stop using your pics if they have the text stolen from ... where you put your domainname on the dots. This would require you to have the path to the file in your code. HTTP REFERER is not always set correctly so I wouldn't trust that to much. B. At 09:13 21-03-2003 +0100, lasse wrote: sure you can. And i don't mind you disagreeing with me either =) Although, if the solution/site is meant to be used by other than people who know something about the webserver i don't think it's a good solution. I can imagine writing something that reads the htaccess-file and edits it... but i don't like the possible securtyissues with that. Besides... if you render a page with a selectbox from mysqltables and another with images and let the user match them together, it's idiotproof =) If you have a php(or whatever)-file wich sole purpouse is to check users rights and render images it can also always check if you have the right cookies. If you've been to the right previous page to see that picture, if not redirect to '/'; Do you get my point? I still believe that the blob i my saviour... (despite the obvious loss of performance) On Thu, 20 Mar 2003, B. van Ouwerkerk wrote: You can use other ways to protect your images from linking by others. Like with Apache and htaccess.. I don't agree with you on your opinion that it's easier to code. If you insert a link into your database all you have to do is retrieve it and push the link to the browser. B. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: images with mysql
Hi! I have a problem with my MySQL I need to have some a images related with an item for example -- ! author ! date of birth an death ! image! -- How can I define the field for the images? I have read that LONGBLOB could be useful for large objct like images, but I can't understand how to set it in my database... Thank you in advance stefano -- S t e f a n o C a r d o Debian GNU-Linux user - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: images with mysql
I had a go with putting a image into MySQL and it did not work. But what I did do is put the directory and image location /image/smile.jpg. This is very good way to use the index of the db and the speed of the file structure. Sorry if this was not what you were looking for but I hope it helps a bit. Simon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 20 March 2003 09:34 To: [EMAIL PROTECTED] Subject: Re: images with mysql Hi! I have a problem with my MySQL I need to have some a images related with an item for example -- ! author ! date of birth an death ! image! -- How can I define the field for the images? I have read that LONGBLOB could be useful for large objct like images, but I can't understand how to set it in my database... Thank you in advance stefano -- S t e f a n o C a r d o Debian GNU-Linux user - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: images with mysql
I am now having a database storing images of chinese characters for research purpose. I wrote a program to store and retrieve them. My images are of type ppm. This is how I designed my table: mysql describe poor; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+ | cc | char(2) binary | | | | | | width | int(1) | YES | | NULL| | | height | int(1) | YES | | NULL| | | data | blob | YES | | NULL| | +++--+-+-+---+ Just have to be really careful in storing binary data. Hope this help. On Thu, 20 Mar 2003 10:34:19 +0100 [EMAIL PROTECTED] wrote: Hi! I have a problem with my MySQL I need to have some a images related with an item for example -- ! author ! date of birth an death ! image! -- How can I define the field for the images? I have read that LONGBLOB could be useful for large objct like images, but I can't understand how to set it in my database... Thank you in advance stefano -- S t e f a n o C a r d o Debian GNU-Linux user - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: images with mysql
IMHO it's better to store a link. I have seen databases (not MySQL) getting corrupted because the file inserted was to big. For the visitor it doesn't really matter whether you put it into the database or not. A link is less difficult and you don't have to retrieve pictures from the database so it might be quicker.. B. At 18:34 20-03-2003 +, Lai Liu-yuan wrote: I am now having a database storing images of chinese characters for research purpose. I wrote a program to store and retrieve them. My images are of type ppm. This is how I designed my table: mysql describe poor; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+ | cc | char(2) binary | | | | | | width | int(1) | YES | | NULL| | | height | int(1) | YES | | NULL| | | data | blob | YES | | NULL| | +++--+-+-+---+ Just have to be really careful in storing binary data. Hope this help. On Thu, 20 Mar 2003 10:34:19 +0100 [EMAIL PROTECTED] wrote: Hi! I have a problem with my MySQL I need to have some a images related with an item for example -- ! author ! date of birth an death ! image! -- How can I define the field for the images? I have read that LONGBLOB could be useful for large objct like images, but I can't understand how to set it in my database... Thank you in advance stefano -- S t e f a n o C a r d o Debian GNU-Linux user - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: images with mysql
Well, this may be off topic. In my case, I store tens of thousands of images, gradually growing. All of them are quite small, most around 30*30 gray scale. Would it still be faster to store them on disk? On Thu, 20 Mar 2003 13:57:06 +0100 B. van Ouwerkerk [EMAIL PROTECTED] wrote: IMHO it's better to store a link. I have seen databases (not MySQL) getting corrupted because the file inserted was to big. For the visitor it doesn't really matter whether you put it into the database or not. A link is less difficult and you don't have to retrieve pictures from the database so it might be quicker.. B. At 18:34 20-03-2003 +, Lai Liu-yuan wrote: I am now having a database storing images of chinese characters for research purpose. I wrote a program to store and retrieve them. My images are of type ppm. This is how I designed my table: mysql describe poor; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+ | cc | char(2) binary | | | | | | width | int(1) | YES | | NULL| | | height | int(1) | YES | | NULL| | | data | blob | YES | | NULL| | +++--+-+-+---+ Just have to be really careful in storing binary data. Hope this help. On Thu, 20 Mar 2003 10:34:19 +0100 [EMAIL PROTECTED] wrote: Hi! I have a problem with my MySQL I need to have some a images related with an item for example -- ! author ! date of birth an death ! image! -- How can I define the field for the images? I have read that LONGBLOB could be useful for large objct like images, but I can't understand how to set it in my database... Thank you in advance stefano -- S t e f a n o C a r d o Debian GNU-Linux user - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: images with mysql
Lai Liu-yuan wrote: Well, this may be off topic. In my case, I store tens of thousands of images, gradually growing. All of them are quite small, most around 30*30 gray scale. Would it still be faster to store them on disk? In most cases yes. We have over 3.5 million images stored and mananaging them from the database side would be almost impossible. There are many benifits to using the file system instead of the database. 1. You can archive the images on cd/dvd/tape as new ones are received/added. 2. Try converting or moving databases with 200GB of blob files. 3. The larger the database, the longer it takes to retreive information. 4. Data from a database is retreived one row at a time so you have to wait for each image. Storing the path in the database allows you to fetch a row, spawn a child process to fetch the image, and continue to fetch rows from the database while the child processes handle getting the images. 5. Mysql will not cache the images. The OS however will cache disk reads. 6. The database has a finite set of resources. You can add many file servers, each specific to what type of image you're pulling. We store stuff by date so we know to pull 1998 images from fileserver a and 1999 images from fileserver b, etc... The OS on each fileserver can then cache what is requested most often. Good luck! walt - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: images with mysql
I assume it is, have not tested it.. If you need to fetch the files from the database your app needs to wait until it has recieved the data. If you only store name/path info it will take less time to fetch the data, ship it off to the browser which can start fetching the images without connecting to the database again. Sounds pretty logical.. and it gets worse if your site is hosted by an ISP who is using a database server running on a seperate box.. B. At 21:35 20-03-2003 +, Lai Liu-yuan wrote: Well, this may be off topic. In my case, I store tens of thousands of images, gradually growing. All of them are quite small, most around 30*30 gray scale. Would it still be faster to store them on disk? On Thu, 20 Mar 2003 13:57:06 +0100 B. van Ouwerkerk [EMAIL PROTECTED] wrote: IMHO it's better to store a link. I have seen databases (not MySQL) getting corrupted because the file inserted was to big. For the visitor it doesn't really matter whether you put it into the database or not. A link is less difficult and you don't have to retrieve pictures from the database so it might be quicker.. B. At 18:34 20-03-2003 +, Lai Liu-yuan wrote: I am now having a database storing images of chinese characters for research purpose. I wrote a program to store and retrieve them. My images are of type ppm. This is how I designed my table: mysql describe poor; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+ | cc | char(2) binary | | | | | | width | int(1) | YES | | NULL| | | height | int(1) | YES | | NULL| | | data | blob | YES | | NULL| | +++--+-+-+---+ Just have to be really careful in storing binary data. Hope this help. On Thu, 20 Mar 2003 10:34:19 +0100 [EMAIL PROTECTED] wrote: Hi! I have a problem with my MySQL I need to have some a images related with an item for example -- ! author ! date of birth an death ! image! -- How can I define the field for the images? I have read that LONGBLOB could be useful for large objct like images, but I can't understand how to set it in my database... Thank you in advance stefano -- S t e f a n o C a r d o Debian GNU-Linux user - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: images with mysql
hey all.. new to the list. Just my 5 cents... I think it's better to store images in the database, sure you loose a bit in performance, but it's easier to code. The way i've done it before is always a separate render.php (or what ever) that compares the users rights to view that image, get's the blob from the database, sets right content-type for the page and then renders the binary data. That way... you can control frames/design (direct links to images can be avoided) und so weiter... //lars On Thu, 20 Mar 2003, B. van Ouwerkerk wrote: I assume it is, have not tested it.. If you need to fetch the files from the database your app needs to wait until it has recieved the data. If you only store name/path info it will take less time to fetch the data, ship it off to the browser which can start fetching the images without connecting to the database again. Sounds pretty logical.. and it gets worse if your site is hosted by an ISP who is using a database server running on a seperate box.. B. At 21:35 20-03-2003 +, Lai Liu-yuan wrote: Well, this may be off topic. In my case, I store tens of thousands of images, gradually growing. All of them are quite small, most around 30*30 gray scale. Would it still be faster to store them on disk? On Thu, 20 Mar 2003 13:57:06 +0100 B. van Ouwerkerk [EMAIL PROTECTED] wrote: IMHO it's better to store a link. I have seen databases (not MySQL) getting corrupted because the file inserted was to big. For the visitor it doesn't really matter whether you put it into the database or not. A link is less difficult and you don't have to retrieve pictures from the database so it might be quicker.. B. At 18:34 20-03-2003 +, Lai Liu-yuan wrote: I am now having a database storing images of chinese characters for research purpose. I wrote a program to store and retrieve them. My images are of type ppm. This is how I designed my table: mysql describe poor; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+ | cc | char(2) binary | | | | | | width | int(1) | YES | | NULL| | | height | int(1) | YES | | NULL| | | data | blob | YES | | NULL| | +++--+-+-+---+ Just have to be really careful in storing binary data. Hope this help. On Thu, 20 Mar 2003 10:34:19 +0100 [EMAIL PROTECTED] wrote: Hi! I have a problem with my MySQL I need to have some a images related with an item for example -- ! author ! date of birth an death ! image! -- How can I define the field for the images? I have read that LONGBLOB could be useful for large objct like images, but I can't understand how to set it in my database... Thank you in advance stefano -- S t e f a n o C a r d o Debian GNU-Linux user - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- -BEGIN GEEK CODE BLOCK- Version: 3.1 (2002 update) GCM/GCS/GMU/ d+ s++:++ a-- C++() UBLAIS+() P+ L+(-) E--- W+++ N+ o-- K w O- M- V- PS(+++) PE++ Y PGP- t 5+ X++ R- tv+ b+ DI+++ D- G e h++ r% y++ --END GEEK CODE BLOCK-- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try:
Re: images with mysql
You can use other ways to protect your images from linking by others. Like with Apache and htaccess.. I don't agree with you on your opinion that it's easier to code. If you insert a link into your database all you have to do is retrieve it and push the link to the browser. B. At 20:18 20-03-2003 +0100, lasse wrote: hey all.. new to the list. Just my 5 cents... I think it's better to store images in the database, sure you loose a bit in performance, but it's easier to code. The way i've done it before is always a separate render.php (or what ever) that compares the users rights to view that image, get's the blob from the database, sets right content-type for the page and then renders the binary data. That way... you can control frames/design (direct links to images can be avoided) und so weiter... //lars On Thu, 20 Mar 2003, B. van Ouwerkerk wrote: I assume it is, have not tested it.. If you need to fetch the files from the database your app needs to wait until it has recieved the data. If you only store name/path info it will take less time to fetch the data, ship it off to the browser which can start fetching the images without connecting to the database again. Sounds pretty logical.. and it gets worse if your site is hosted by an ISP who is using a database server running on a seperate box.. B. At 21:35 20-03-2003 +, Lai Liu-yuan wrote: Well, this may be off topic. In my case, I store tens of thousands of images, gradually growing. All of them are quite small, most around 30*30 gray scale. Would it still be faster to store them on disk? On Thu, 20 Mar 2003 13:57:06 +0100 B. van Ouwerkerk [EMAIL PROTECTED] wrote: IMHO it's better to store a link. I have seen databases (not MySQL) getting corrupted because the file inserted was to big. For the visitor it doesn't really matter whether you put it into the database or not. A link is less difficult and you don't have to retrieve pictures from the database so it might be quicker.. B. At 18:34 20-03-2003 +, Lai Liu-yuan wrote: I am now having a database storing images of chinese characters for research purpose. I wrote a program to store and retrieve them. My images are of type ppm. This is how I designed my table: mysql describe poor; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+ | cc | char(2) binary | | | | | | width | int(1) | YES | | NULL| | | height | int(1) | YES | | NULL| | | data | blob | YES | | NULL| | +++--+-+-+---+ Just have to be really careful in storing binary data. Hope this help. On Thu, 20 Mar 2003 10:34:19 +0100 [EMAIL PROTECTED] wrote: Hi! I have a problem with my MySQL I need to have some a images related with an item for example -- ! author ! date of birth an death ! image! -- How can I define the field for the images? I have read that LONGBLOB could be useful for large objct like images, but I can't understand how to set it in my database... Thank you in advance stefano -- S t e f a n o C a r d o Debian GNU-Linux user - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- -BEGIN GEEK CODE BLOCK- Version: 3.1 (2002 update) GCM/GCS/GMU/ d+ s++:++ a-- C++() UBLAIS+() P+ L+(-) E--- W+++ N+ o-- K w O- M- V- PS(+++) PE++ Y PGP- t 5+ X++ R- tv+ b+ DI+++ D- G e h++ r% y++ --END GEEK CODE BLOCK--
RE: Images in MySql
Eric, Generally you would store references to the images in the database as a full or partial pathname. You can store binary data in the db itself using the BLOB type but this is not necessarily the most efficient approach to take John Lodge -Original Message- From: Eric Torr Klopper [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 12:31 PM To: [EMAIL PROTECTED] Subject: Images in MySql Hi all. Eric here from South Africa. I'm fairly new at using mysql and need to access images via a php website. What is the best way to store images or reference to images like jpg and gifs in a mysql db? Also what would the sql querie look like to call the and view the image. Is there any documentation specificaly geared towards to images in mysql. Any help on the matter would be greatly appreciated. Thank you Eric Torr Klopper Thrasher Technologies +27 82 219 3994 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: images and mysql
This topic has been discussed many times on the PHP General (archived at http://marc.theaimsgroup.com/?l=php-general) and PHP DB (archived at http://marc.theaimsgroup.com/?l=php-db) mailing lists. Search the archives for the terms 'MySQL images blob' and you will find a wealth of posts. Good Luck! --zak J.Heegsma wrote: I use a mysql database on the web and use php to get information from it. Now I want to use pictures/images in the database. I've included a php script The information I get from the mysql database in a while statement. My question is, how do I get the picture available on the web, must I put this in the mysql-database and how do I do this? [snip] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php