Just a little gotcha in PHP and ms sql access:
If you fetch a row from my sql, and are trying to compare a field value to see if it is NULL, use the === operator. The == operator will trigger a type conversion inside PHP and make null == 0 returns true.
Reference: http://ca.php.net/manual/en/types.comparisons.php
Showing posts with label type comparison. Show all posts
Showing posts with label type comparison. Show all posts
Tuesday, February 26, 2008
Subscribe to:
Comments (Atom)