Wordpress ships using the wpdb class which handles CRUD procedures. The 2 techniques of the class that I am thinking about would be the insert() (the C in CRUD) and update() (the U in CRUD).

An issue arises when I wish to place a NULL right into a mysql database column - the wpdb class escapes PHP null variables to empty strings. How do i tell Wordpress to make use of a real MySQL NULL rather than a MySQL string?

If you would like it to compatible you would need to SHOW COLUMN and see ahead if NULL is permitted. Whether it was permitted then when the value was empty($v) use val = NULL within the query.

$foo = null;
$metakey = "Harriet's Adages";
$metavalue = "WordPress' database interface is like Sunday Morning: Easy.";

if ($foo == null) {
$wpdb->query( $wpdb->prepare( "
    INSERT INTO $wpdb->postmeta
    ( post_id, meta_key, meta_value, field_with_null )
    VALUES ( %d, %s, %s, NULL )", 
        10, $metakey, $metavalue ) );
} else {
$wpdb->query( $wpdb->prepare( "
    INSERT INTO $wpdb->postmeta
    ( post_id, meta_key, meta_value, field_with_null )
    VALUES ( %d, %s, %s, %s)", 
        10, $metakey, $metavalue, $foo ) );
}