Welcome Guest, Not a member yet? Register   Sign In
Query Builder is not null
#1

I'm in the process of upgrading my project from 3.0.0 to 3.1.8 (in one go).

After going over all the required changes listed in the docs, I started testing my project, and realized something is different in the way CI is treating IS NOT NULL statements in the Query Builder.

In my 3.0.0 project, I used syntax like this:

PHP Code:
$this->db->where(array('book_code'=>$book_code,'poi_num is not' => null)); 


to produce
WHERE book_code=[code value] AND poi_num IS NOT NULL

but now, in 3.1.8, the same code produces:
WHERE book_code=[code value] AND poi_num IS NOT

So I changed my Query Builder syntax to:


PHP Code:
$this->db->where(array('book_code'=>$book_code,'poi_num is not NULL' => null)); 

And now it works fine.

But:
1. Is this the correct syntax to use in such cases?

2. Was this a known issue in one of the upgrades between 3.0.0 and 3.1.8? If so, where was it documented? I'm worried that if I missed this, I might have missed other important changes.
Reply


Messages In This Thread
Query Builder is not null - by einav - 03-31-2018, 02:19 PM
RE: Query Builder is not null - by jreklund - 03-31-2018, 04:18 PM
RE: Query Builder is not null - by einav - 04-01-2018, 02:37 AM
RE: Query Builder is not null - by jreklund - 04-01-2018, 04:23 AM
RE: Query Builder is not null - by einav - 04-01-2018, 05:19 AM
RE: Query Builder is not null - by jreklund - 04-01-2018, 05:56 AM
RE: Query Builder is not null - by einav - 04-02-2018, 03:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB