Andrew Johnson - 2013-10-02 09:56:39 - In reply to message 2 from Andrew Johnson
I think I may have partly answered this for myself. By setting the variable to NULL if this is an empty string, then the query method passes the NULL correctly to the database.
Still remains that passing an empty string adds 0 to a varchar column. Looking in the code for the class, I see that the values passed are tested for type and is_string() should identify an empty string correctly as a string type.