N
N
NataliaCh2015-10-14 12:14:14
Drupal
NataliaCh, 2015-10-14 12:14:14

How to create your own table?

I create the type of material "Event". A bunch of fields, including several status ones, that is, logical ones (yes, no). Accordingly, Drupal creates its own table in the database for each status (and even two, revision yet).
These status fields will only be used for this content type, and so it seems logical if they were written to the same table like:
nid | status1_value | status2_value | status3_value
So far I have no idea how this is done, but for some reason it seems that it is possible in Drupal. If this is true, direct, pliz, tell me the algorithm ... how is this done in principle?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
andead, 2015-10-14
@andead

https://api.drupal.org/api/drupal/modules%21system...

A
afi13, 2015-10-14
@afi13

You can write your own composite field that will store all the values ​​you need in one table. Can you see this video to get an idea of ​​how it's done.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question