image posting
Moderator: General Moderators
-
swissbeets
- Forum Newbie
- Posts: 20
- Joined: Thu Jun 26, 2008 7:56 pm
image posting
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
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: image posting
it's generally agreed that images should be stored in the filesystem, and you should store the path to the image in the DB.
-
swissbeets
- Forum Newbie
- Posts: 20
- Joined: Thu Jun 26, 2008 7:56 pm
Re: image posting
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
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.
-
swissbeets
- Forum Newbie
- Posts: 20
- Joined: Thu Jun 26, 2008 7:56 pm
Re: image posting
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?