storing images for catalog

    Date: 07/18/05 (PHP Community)    Keywords: php, database

    what is the recommended method for storing images for a catalog-type interface;

    usually (cuz it's easy for me and easy for the client to handle) i've added a "filename" field to my items or products table, then when the client adds an item, they put the filename into this field, and put the image in a specific folder (if I do thumbnails, typically i'll have a "thumbs" directory below the catalog images directory, and specify that the thumbnail filename be the same as the full-sized filename) - i find this method is easy for the client since they've got readable filenames if they need to make edits to the images as opposed to a numbered image system;

    just out of curiosity, is it a 'better' practice to handle the uploading of image with the php and assigning an ID (i.e. - 4032.jpg) to the images which is pegged to the product in the database somehow? (either the image ID corresponds to the product ID, or maybe a seperate table tracks this if multiple images attributed to a single item)

    anyway, this is something that i do fairly frequently, and just looking for input on other methods that may be better or more efficient

    Source: http://www.livejournal.com/community/php/321060.html

« returning data from newly... || Hey everybody »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home