title: codeigniter database error in selecting data
body: <p>I'm having a problem with selecting data from my database. It show me following error</p>
  
  <pre><code> A Database Error Occurred
  
   Error Number: 1054
  
   Unknown column 'BA' in 'where clause'
  
   SELECT * FROM crime_details INNER JOIN crime_slink ON crime_slink.report_ID =crime_details.report_ID INNER JOIN crime_suspect ON crime_suspect.id=crime_slink.suspect_id INNER JOIN crime_vlink ON crime_vlink.report_ID=crime_details.report_ID INNER JOIN crime_victim ON crime_victim.id=crime_vlink.victim_id WHERE crime_details.report_ID =BA-12-00002
  
   Filename: C:\xampp\htdocs\CNPPO\system\database\DB_driver.php
  
   Line Number: 330
  </code></pre>
  
  <p>It seems like the problem is in this part  <code>WHERE crime_details.report_ID =BA-12-00002</code>
  I think the problem was caused by the dashes or hyphens in my query.
  Im using <code>$this-&gt;db-query()</code> function of codeigniter for my queries.</p>