title: Using Columns in a RegExp in MySQL
body: <p>I'm using the following query with <code>regexp</code>:</p>
  
  <pre><code>SELECT a.id, a.company, a.name, b.title, b.description, b.t_id
  FROM a, b
  WHERE ( b.title
  REGEXP "[[:&lt;:]]a.company[[:&gt;:]]" OR b.description
  REGEXP "[[:&lt;:]]a.company[[:&gt;:]]" OR b.title
  REGEXP "[[:&lt;:]]a.name[[:&gt;:]]"  OR b.description
  REGEXP "[[:&lt;:]]a.name[[:&gt;:]]" ) AND a.company !=  '' AND a.name !=  ''
  </code></pre>
  
  <p>But, this query is not giving any result nor its giving any syntax error.</p>
  
  <p>When I replace <code>a.company</code> or <code>a.name</code> with any of the company name then this query runs fine. Why doesn't this query work with the column names?</p>