S
S
Space2017-10-18 18:32:25
MySQL
Space, 2017-10-18 18:32:25

What type of field to specify in Mysql for data separated by commas?

You need to add an 'extra' column to the table in order to enter individual parameters there. I assume the parameters are separated by commas, and when receiving from the database, simply separate them by commas and enter them into an array.
There was a question: what type of a field to use? The length and number of parameters cannot be predetermined. Varchar will probably be small or not?
Criteria: the maximum required field type so that it does not take up more space than necessary.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
JhaoDa, 2017-10-18
@JhaoDa

It's time to use JSON instead of "parameters separated by commas, and when getting from the database, just separate them by commas and put them in an array"...

R
Rastishka, 2017-10-18
@Rastishka

Use JSON, it is supported by both MySQL and Laravel

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question