View Full Version : photo in database
alexdog1805
11-05-2008, 12:41 PM
does anybody knows how i can introduce a photot in database with what camp and what commands?:)
boogyman
11-05-2008, 03:42 PM
If you are trying to create photo gallery that is much different from just trying to associate one image with a record in a database.
If the latter:
You would first need to create a field inside the table to store the image path. It is much more efficient to store a path to an image, than the actual image data.
Once you have created the record, add the field to the insert query that you are performing, and set it to the path of the image.
If you are allowing user-input based images, you should be doing some validation to ensure the file being uploaded is actually an image, and that the file is within whatever dimensions and size restrictions you would like.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.