1

I'm trying to make a list of numbers structure in MySQL (phpMyAdmin), I was thinking about storing it as a varchar with commas between all the numbers, and then when I want to fetch them I just split them, but I'm not sure if this is the best way to do it.

~Sorry if I wasn't clear, my English isn't that good.

Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43
PepsiGam3r
  • 302
  • 1
  • 4
  • 10

2 Answers2

1

Depending on the length of the number, probably you can use just use TEXT data type.

HashSu
  • 1,507
  • 1
  • 13
  • 13
0

with explode function you can separate your data with specified character and store into array

ex.

$demo = '1,2,3,4';
$data = explode(',',$demo);

this with store 1,2,3,4 separately in data array

Divyank
  • 740
  • 3
  • 20