In my MySql I have the following column data_id
it stores values in this 120-01-01
format, as would be SELECT
that would make a EXPLODE
in that field and check if the first value of array
than in case would 120
, hit with the value typed?
explode('-', $data_id)
and then compare if the first key hits the desired value, but that would compel me to search all the values in the table before, which is out of the question for obvious reasons, so I would like to know if it is possible to do the same within SELECT
.
Note: this column is not a date
field, but a varchar