Welcome Guest, Not a member yet? Register   Sign In
does this function work in CI 4.3.1 whereNotNull()
#1

(This post was last modified: 05-11-2023, 07:26 AM by luckmoshy.)

PHP Code:
$query $this->db->table('table')
    ->whereNotNull('CustomerName')
    ->whereNotNull('ContactName')
    ->orWhereNotNull('Address')
    ->get();
$result $query->getResult(); 
it looks like not working, it shows null rows

Code:
SELECT CustomerName, ContactName, Address
FROM Customers
WHERE Address IS NOT NULL;
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#2

(This post was last modified: 05-11-2023, 12:01 PM by JustJohnQ.)

Code:
SELECT CustomerName, ContactName, Address
FROM Customers
WHERE CustomerName IS NOT NULL
AND ContactName IS NOT NULL
OR Address IS NOT NULL;
Reply




Theme © iAndrew 2016 - Forum software by © MyBB