• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$this->db->where(); custom string problem

Im trying to select some values using a custom string. below is my code

  $st="infor='rent' AND (typeq='in' OR typeq='out')";
  $q = $this->db->get();

Quote:A Database Error Occurred

Error Number: 1054

Unknown column 'infor='rent'' in 'where clause'
SELECT * FROM (`posted_ads`) WHERE `infor='rent'` AND (typeq='in' OR typeq='out')
Filename: C:\wamp\www\parklot\system\database\DB_driver.php
Line Number: 330

i think the problem is coz of
WHERE `infor='rent'`

when i manualy execute this code it works perfectly.
WHERE infor='rent'

how do i get rid of
because its automatically added

Messages In This Thread
$this->db->where(); custom string problem - by El Forum - 09-25-2011, 09:03 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.