G
G
GoodPirojok2020-08-09 23:44:05
Database design
GoodPirojok, 2020-08-09 23:44:05

How to create a table for posts?

Tell me how to implement a similar template engine or structure for posts.
There is no template for how many maximum photos or the number of text fields, but how to arrange it so that you can create posts like these without being tied to rigid frames?

Название поста
Заголовок
Картинка
Текст


--------------------

Название поста
Заголовок
Текст
Заголовок
Текст
Картинка
Картинка


The options may be different, how are such posts made, are a lot of columns created, or is the code written in one column and just sent after?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-08-10
@Alexandre888

a lot of columns are created or the code is written in one column and just sent after?

no, you can certainly make another bike, but what's the point? you don’t need to create a lot of columns either, three will be enough:
user ID, article ID, content (pictures + -)
There is no one template for how many maximum photos or the number of text fields, but how to arrange it so that you can create posts like these without being tied to rigid frames?

I would advise you to define some kind of framework for your project, because the place in the database is still limited.
you should start with data types - google them, choose the options that are best for you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question