MySQL Table video
id | path
4 | 89_1232
6 | 90_2121
I need to match path before underscore _. For instance 89 , 90. Is it possible with MySQL query.
Right now what I am doing is, fetching all rows and then explode path row:
"SELECT `path` FROM `video`
then foreach () { explode and check }
path LIKE "%' . $value . '_"