mikecao / sparrow

A simple database toolkit for PHP
MIT License
289 stars 68 forks source link

Null in where() #18

Open fdcore opened 9 years ago

fdcore commented 9 years ago

I have table with field default is null.

id user email
1 name1 name1@domain.com
2 name2 name2@domain.com
3 name3 NULL

Query:

SELECT users WHERE email IS NULL

Code:

$db->from('users')->where('email', null)->many();

This code is not work.

fdcore commented 9 years ago

fix https://gist.github.com/fdcore/cdaf25375ef3328a5e48

UDK commented 4 years ago

@fdcore Hi, why didn’t you make your decision through pull request?