Page 1 of 1

How to enter/edit in a NULL?

PostPosted: Tue Sep 01, 2009 1:59 pm
by lhat
Hi,

Apologies if this is a lame-brained question, but how does one enter a NULL when editing a record through XF?

My field is defined in MySQL as an INT and it can be made NULL; default is also NULL; but when I go to edit the field in XF's Edit mode, I cannot find a way to make that field blank: it always becomes a zero (0). This happens if I remove the field's contents, put in a space, escape or backslash a space or nothing, or put in "".

Since we're working with data where a 0 is a score (while NULL is not), we need that NULL.

I've now reset this field to VARCHAR, which allows XF to set the field to nothing, but that loses me some of the advantages of INT.

Any help most appreciated.

PostPosted: Tue Sep 01, 2009 6:32 pm
by shannah
This is sort of a bug in the existing version. If you download the latest Dataface/Serializer.php file and replace your existing one with it, it should make blank into null.

http://weblite.ca/svn/dataface/core/tru ... alizer.php

-Steve

Great!

PostPosted: Wed Sep 02, 2009 10:03 am
by lhat
Thanks, Steve!