title: CodeIgniter ActiveRecord join() method wrapping numbers with backticks
body: <p>This is my active record code in CodeIgniter:</p>
  
  <pre><code>$this-&gt;db-&gt;...
  $this-&gt;db-&gt;join('post_likes', 'post_likes.user_id="'.$this-&gt;db-&gt;escape($online_user).'" AND post_likes.post_id=post.id', 'left');
  </code></pre>
  
  <p>And this is how it is interpreted:</p>
  
  <pre><code>LEFT JOIN `post_likes` ON `post_likes`.`user_id`="`3"` AND post_likes.post_id=post.id
  </code></pre>
  
  <p>it gives the error:</p>
  
  <pre><code>`user_id`="`3"` 
  </code></pre>
  
  <p>How to write a direct number in active record?</p>
  
  <hr>
  
  <p>Update:</p>
  
  <p>removing <code>escape</code></p>
  
  <p>to test it on your computer you dont need to have a database. Just trying this code shows the error:</p>
  
  <pre><code>$this-&gt;db-&gt;select('*')
      -&gt;from('mytable')
      -&gt;join('post_likes', 'post_likes.user_id="3" AND  post_likes.post_id=post.id', 'left');
  $query=$this-&gt;db-&gt;get('');
  var_dump($this-&gt;db-&gt;last_query());
  exit(0);
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>A Database Error Occurred
  
  Error Number: 1064
  
  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '` AND post_likes.post_id=post.id' at line 3
  
  SELECT * FROM (`mytable`) LEFT JOIN `post_likes` ON `post_likes`.`user_id`="`3"` AND post_likes.post_id=post.id
  </code></pre>