How to enter/edit in a NULL?

A place for users and developers of the Xataface to discuss and receive support.

How to enter/edit in a NULL?

Postby lhat » Tue Sep 01, 2009 1:59 pm

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.
lhat
 
Posts: 40
Joined: Thu Aug 06, 2009 3:31 pm

Postby shannah » Tue Sep 01, 2009 6:32 pm

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Great!

Postby lhat » Wed Sep 02, 2009 10:03 am

Thanks, Steve!
lhat
 
Posts: 40
Joined: Thu Aug 06, 2009 3:31 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 23 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved