Forums

This topic is locked

MySQL and Images

Posted 11 May 2004 23:07:14
1
has voted
11 May 2004 23:07:14 Mike Hicks posted:
I am sure that this has been visited (and re-visited). I have heard that one should not store images in a database. I am managing a new domain (web design....then managing the site...I manage three so far) and the client (a real estate broker) wants to build a site that will allow his listings (pixs descriptions and so on) on the site.....he wants me to manage the database also if that is the way I go....and I should because he wants his client to be able to search the listings. I expect that I will do the main site in PHP. How can I associate the pixs with the appropiate data and keep maintenance costs (and more important.....data update headaches) down and still use a database....(I don't want to create new pages everytime he gets a new listing.)

Replies

Replied 11 May 2004 23:51:33
11 May 2004 23:51:33 Dave Thomas replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
(I don't want to create new pages everytime he gets a new listing.)
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

you dont need to, all his listing will lie on a master page, seperated by categories whatever, and then the details of each listing show on a single detail page which passes the ID of the database info to the page, hence showing the relevant info.

for example

www.yoursite.com/article.asp?ID=2

one page parses as many records as you want, so whether he has 5 or 5000 records, you still nly need one Detail page for the lot of them.

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 12 May 2004 00:19:17
12 May 2004 00:19:17 Mike Hicks replied:
Ah.......I understand. Is the associated image handled the same way? Is it (associated image) actually in the database or should I pass (somehow) a URL to the file location?
Replied 12 May 2004 23:07:26
12 May 2004 23:07:26 Vince Baker replied:
If you have the filename of the image stored in the database then you can dynamically show the image associated with the record id passed as Dave explained.

Create a recordset on your detail page that gets all the info you want displayed plus the image file name.

Then, insert an image but select data source rather than browse for an actual image and this will get the filename. You will have to add the image directory path manually as well.

For example, you will see &lt;%=yourrecordsetname.fields.item("yourfieldname".value%&gt; displayed as the chosen image, just add the path to your folder holding the image, for example: /images/uploaded_files/&lt;%=yourrecordsetname.fields.item("yourfieldname".value%&gt;

And you wil lhave a dynamic detail page showing the image.



Regards
Vince

DMX Talkzone Manager

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 12 May 2004 23:34:20
12 May 2004 23:34:20 Mike Hicks replied:
Thanks guys!!! You are helping make this project a lot easier!

Reply to this topic