A Database Error Occurred |
[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Conversion failed when converting the varchar value 'currInstl + 1' to data type int.
SELECT "custNo", "custName", "totalInstal", "InstallAmnt" FROM "fund" WHERE "status" = 'A' AND "branch" = 16 AND "totalInstal" > 'currInstl + 1' ORDER BY "custName" ASC Ref (Sql Query works well) ================= select custNo, custName, totalInstal, InstallAmnt from fund where status='A' and branch=16 and totalInstal> currInstl+ 1 order by custName; but not to works in codeigniter..Please help me
@Mohamed,
can you send your PHP code with your sql request? Perhaps, a problem with your quotes: 'currInstl + 1'
(03-30-2019, 02:54 AM)hc-innov Wrote: @Mohamed, public function getFund() { return $this->db->select('custNo, custName, totalInstal, InstallAmnt') ->from('fund') ->where('status', 'A') ->where('branch', 16) ->where('totalInstal >', 'currInstl + 1') ->order_by('custName', 'asc') ->get() ->result_array(); }
You can try this
PHP Code: public function getFund()
(03-30-2019, 11:04 AM)hc-innov Wrote: You can try this |
Welcome Guest, Not a member yet? Register Sign In |