title: How to fetch all rows from table if like operator value match using mysql?
body: <p>I'm trying to fetch all record if <strong>like</strong> operator value match and is true.  </p>
  
  <p>I have table ticket.</p>
  
  <pre><code>---------------------------
  : id  :  ticket : user_id :
  ---------------------------
  : 1   : 2546    : 2       :
  ---------------------------
  : 2    : 8475    : 2      :
  ---------------------------
  </code></pre>
  
  <p>I'm trying this query </p>
  
  <pre><code>SELECT * FROM `ticket` WHERE `ticket` LIKE '%2546%'  
  </code></pre>
  
  <p>Above query is returning single result and is working fine. But I need both rows if <strong>like</strong> operator value match and table has more record of that row <strong>user_id</strong>. I tried group by</p>
  
  <pre><code>SELECT * FROM `ticket` WHERE `ticket` LIKE '%2546%' 
  GROUP BY `user_id `
  </code></pre>
  
  <p>I know it can be done if use  <code>user_id = 2</code> instead of <code>like</code> and <code>Group By</code> operator but I need to filter by <code>ticket</code> column. So is this possible to achieve this kind of task in single query? </p>