G
G
Grag2014-07-22 19:30:35
MySQL
Grag, 2014-07-22 19:30:35

How to organize relational storage of images?

Hello. How to implement the full relationality of storing pictures, so that they can be removed from the database. record and immediately deleted the associated pictures?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sasha, 2014-07-22
@madmages

here in short such a thing ... there is such garbage .... OOP is called ... but what is OOP, there is cooler garbage, the FUNCTION is called. there is an opinion that if you create a function f that will take argument A where this argument will be the path to the picture and inside the function you will sequentially delete the picture from the database and on the disk, then everything will be top type, you can finally download

M
Maxim Vasiliev, 2014-07-22
@qmax

For example, store them in the database in the form of a blob

S
Snewer, 2014-07-22
@Snewer

Of course, storing pictures in the database is not good. It is better to store the id of the picture, a link to the picture. When deleting an entry, also delete the associated file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question