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

How to insert a NULL value inside the XenForo Database

Hoffi

Well-known member
#1
I fount nothing inside the XF Scripts.

If I create e DataWriter for a table, that has a colum in which can stored NULL.

How can I Update a row and change the value to NULL?

During Insert, the defautl value ist NULL and I simple did not set the value, but If I set the Valur to NULL with the datawriter, I got an SQL Error.

On this Field I created an ForeignKey with NULL allowed. Change the Value per Query direct in he dabase works.

The same error occurs, If one try inside the referencing table has the key 0 and I want to write that.