title: Codeigniter mysql query with special characters
body: <p>Been struggling with this thing for hours now. Hopefully someone could help me out.</p>
  
  <p>Trying to get data from mysql based on first and last name. Everything works just fine except when there is special characters like ä or ö. </p>
  
  <p>I have the profiler on and query looks like this:</p>
  
  <pre><code> SELECT mail, address, title FROM users WHERE firstname='teemu' AND lastname='sel%C3%A4nne'  
  </code></pre>
  
  <p>And it should be:</p>
  
  <pre><code>SELECT mail, address, title FROM users WHERE firstname='teemu' AND lastname='selänne' 
  </code></pre>
  
  <p>In my model it's like this:</p>
  
  <pre><code>$sql = "SELECT mail, address, title FROM users WHERE firstname=? AND lastname=?";
  </code></pre>
  
  <p>How can I fix this? Thank you!</p>
  
  <p>Controller</p>
  
  <pre><code>        public function edit() 
      {
          $this-&gt;load-&gt;model('p_model');
  $this-&gt;load-&gt;view('edit',$data);
    }
  
  public function ajax_p($first,$last)
    {
          $this-&gt;load-&gt;model('p_model');
  
  $data['info'] = $this-&gt;p_model-&gt;pInfo($first,$last);
  
  $this-&gt;load-&gt;view('ajax/p',$data);
      }
  </code></pre>