I am trying to get the whole record if the parameter value , like , is true.
I have a table ticket.
: id : ticket : user_id :
: 1 : 2546 : 2 :
: 2 : 8475 : 2 :
I am trying to fulfill this request
SELECT * FROM `ticket` WHERE `ticket` LIKE '%2546%'
The above query returns one result and works fine. But I need both rows if the correspondence of the value is like , and the table has more entries for this row user_id . I tried a group
SELECT * FROM `ticket` WHERE `ticket` LIKE '%2546%'
GROUP BY `user_id `
I know that this can be done if used user_id = 2instead of likeand Group By, but I need to filter the column ticket. So is it possible to achieve this kind of tasks in one request?