• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Why no TYPE_NUM or TYPE_UNUM in DataWriter?

digitalpoint

Well-known member
#1
Am I missing something, or is there no simple way to write a decimal number via the datawriter?

Should I just pretend it's a string (although seems kind of silly to do it that way)?

Edit - Nevermind, just noticed the TYPE_FLOAT...
 

Beanjam

Active member
#2
A bit of a thread mine, but I'm adding a decimal field and had the same question.

As an example, xf_user_upgrade.cost_amount is a DECIMAL (10,2) defined as TYPE_FLOAT and filtered with XenForo_Input::UNUM.

So I assume this is still the recommended way, unless anyone knows otherwise?