Storing Image Location in MySQL

From: Date: Sun, 22 Feb 2009 08:43:06 +0000
Subject: Storing Image Location in MySQL
Groups: php.db 
Request: Send a blank email to php-db+get-45986@lists.php.net to get a copy of this message
Dear All, I am trying to store the location of a image into MySQL database, so that I can call it back from PHP to display it in a browser. For this purpose, I have created a table with two columns (BuildingCode, Location), where building is the primary key and location is the location where my picture is stored on my PC. My image is stored at /C:\Users\Sashikanth\Desktop\burruss.jpg/ on my PC. The following table is an output from MySQL. +--------------+-----------------------------------------+
| BuildingCode   | Location                                                |
+--------------+-----------------------------------------+
| 176                 | c:/users/sashikanth/desktop/burruss.jpg   |
+--------------+-----------------------------------------+ Considering my original Image Location on my PC, will the above table be of any help if I try to retrieve the image using PHP? Is there any mistake in what I have done till now? I know that this may be a very basic question and i have searched through the internet quite extensively but could not find a solid answer. Would appreciate it greatly if anyone can help. Thanks, Sashi -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sashikanth Gurram Graduate Research Assistant Department of Civil and Environmental Engineering Virginia Tech Blacksburg, VA 24060, USA

« previous php.db (#45986) next »