Welcome Guest, Not a member yet? Register   Sign In
Oracle Issue with where
#1

[eluser]Unknown[/eluser]
Hi,

I have been using MySql with no problem and I have just added Oracle, so I now have 2 db connections all works fine except for when using active record with where clause. For some reason quotes are being added to the first field of the where clause.

the below is generating an error by adding the quotes to MON.
Code:
$qwhere = "MON >= '2009-01' AND MON <= '2010-06' AND CITY = 'LA'";

$records = $ORA->select($qselect,FALSE)->from($qtable)->where($qwhere,FALSE)->get()->result();

"select sales_vol, units from table where "MON" >= '2009-01' AND MON <= '2010-06' AND CITY = 'LA'"

If I use this, no problem
Code:
$records = $ORA->query("select sales_vol, units from table where MON >= '2009-01' AND MON <= '2010-06' AND CITY = 'LA'")->result_array();

I have looked through the driver code, but nothing is jumping out at me.

If anyone has any insight i would much appreciate a pointer. Thanks




Theme © iAndrew 2016 - Forum software by © MyBB