Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

Query Builder is not null

$
0
0
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.

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>