Page 1 of 1
image posting
Posted: Mon Jun 30, 2008 11:28 am
by swissbeets
i am tryin to have the image that applies to a product be displayed at the same time and also be able to be updated and added together. So i have a products table already with the primary key being product_id i made an images table and set the primary key to product_id also then the only other field in this table is the image(blob) does this seem like it will work? also any ideas or other help would be great i am still kind of confused on the issue
Re: image posting
Posted: Mon Jun 30, 2008 11:55 am
by Kieran Huggins
it's generally agreed that images should be stored in the filesystem, and you should store the path to the image in the DB.
Re: image posting
Posted: Mon Jun 30, 2008 12:12 pm
by swissbeets
thats what i heard but i have already begun doing it this way, thank you but i think i am going to change it on the next website i just want to get this working for now does that logic make sense eventhough it is not the best way to do it?
Re: image posting
Posted: Mon Jun 30, 2008 12:19 pm
by onion2k
What you've suggested will work, no problem there, but it's actually more complicated to code than the 'right' way storing the images as files, especially if you're a bit new to PHP. I would recommend changing your approach now rather than leaving it till the next site.
Re: image posting
Posted: Mon Jun 30, 2008 12:23 pm
by swissbeets
ok will do, do you know of any tutorials and just so i know, could you give me an example of how the picture will be displayed?