John Campbell wrote: > You should be aware that PHP and SQL have completely different concepts of > null. > > In php, null is a unique magic value that means "undefined", and if > two things are null, then they are equal.
<snip> > In a SQL view of the world, that can be interpreted as: > Are two not yet known values equal? > and the answer is: > "Not yet known" > > In sql, every comparison to NULL, yields another NULL. > That is why 'SELECT * WHERE foo = NULL' doesn't do what you might > expect. In fact that query is guaranteed to always return zero rows. OMG, having this info solves a big piece of the puzzle for me--thank you! > It is a fact of life that pretty much every language handles NULL > differently, and whenever I learn a new language, it is one of the > first things I research. I'll keep that in mind. Bev _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php
