Reputation: 91
I know I can store images in mysql as data type blob. Wandering if i can compare the blob values in my query?
E.g. select answer from mtTable where imageBlobValue = image010.
Here imageBlobValue and image010 data type is blob.
TIA
Upvotes: 0
Views: 825
Reputation: 303
Well, while that should be theoretically possible, a more optimal way to handle this would be to store an image hash or some other unique identifier alongside the blob to use for query purposes.
You want to minimize the amount of times the database has to handle that blob in memory and the best way to do that is to have a suitable key to search on.
Upvotes: 1