Friday, November 7, 2008

Using Xataface to search for NULL

If there is a row in a table that contains a NULL value, you can use Xataface to search specifically for that record but it's not as trivial as searching for NULL. You have to set it to an equal sign which will basically look for exact matches to nothing. For example:

$temp_types = df_get_records_array('n1_tire_types', array('-limit'=>200, 'parent_id' => "="));


Will look for columns in the n1_type_types table with a parent_id of empty or NULL.

No comments: