PDA

View Full Version : posting an image through php into mysql


swissbeets
06-24-2008, 08:36 PM
i am new to php but am building a website. i have the whole thing done with exception to such things as, uploading the image to match the product, displaying these images with their desired products, and a shopping cart. but i am currently building the database which includes,


product_id int(30) No auto_increment Browse distinct values Change Drop Primary Unique Index Fulltext

Product_type varchar(30) latin1_swedish_ci No Browse distinct values Change Drop Primary Unique Index Fulltext

Product_price decimal(3,2) No Browse distinct values Change Drop Primary Unique Index Fulltext

Product_description varchar(40) latin1_swedish_ci


what type should i make the product_image (this will only be a location if i am correct)

domedia
06-24-2008, 08:41 PM
varchar I guess since it's only going to point to the path on server

swissbeets
06-24-2008, 08:42 PM
does this make sense to you?

davidj
06-24-2008, 09:07 PM
varchar it is

lux
06-25-2008, 09:18 AM
varchar all the way!

davidj
06-25-2008, 11:02 AM
schnizzle muh nizzle izzle bizzle fizzledizzle ya Varchar!

swissbeets
06-26-2008, 06:45 PM
just making sure i have this correct. i cannot store an image on mysql so i will have to store it in my image folder which will be hosted on godaddy it makes sense to just store the image locations on mysql and from there they can be brought up and applied to my website correct?

the reason i am doing this is so the the back end user can update the site with no programming knowledge.

thanks for all of your help

domedia
06-26-2008, 06:49 PM
just making sure i have this correct. i cannot store an image on mysql so i will have to store it in my image folder which will be hosted on godaddy it makes sense to just store the image locations on mysql and from there they can be brought up and applied to my website correct?
You can do both, but it makes more sense just storing the image location instead of the image itself in the DB.

swissbeets
06-26-2008, 06:52 PM
ok thank you very much