How to save array in database?

image

Depends on how you like to save and retrieve data. You can save the values (IDs) comma separated in one field like 1,2,4,5 then you’ll need “split” to handle the data.

Or into an additional table with multiple records and the ID of the parent table like:

parentID childID
1 1
1 3
1 4
1 5

then you’ll have to use repeats to handle data. Hope this helps :slight_smile:

With the JSON fields you don’t need to split/join arrays any longer:

Multiple values are stored as arrays in the database :slight_smile:

Nice,I will check it sir, thanks.