G
G
GrindYeee2021-08-16 23:18:09
MySQL
GrindYeee, 2021-08-16 23:18:09

What is the correct way to store multiple values ​​inside a field in MySQL?

I have a fairly simple database for storing data and posting it to a page: id, title, text, date. I want to add another column for photos, but I don’t know how to do it correctly, because in theory there is one field, and there should be one link to the photo. How to store several links to photos in the database for one id, if, in theory, only one link can be inserted there for further manipulations?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2021-08-16
@GrindYeee

"multiple values ​​within a field" in relational database terms is a single table that refers to a row in the original table. you can get all the photos from it by the publication id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question