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

Empty Date - should it default to null or 0

arms

Active member
#1
I was going with null but:

$fields['xf_pg_thread']['end_date'] = array('type' => self::TYPE_UINT, 'default' => NULL)

still records as 0?

I know I could set it as 0, but isn't it best practice to use null as i'll be using value in sql and it'll ignore null whereas if I use 0 it'll run against all records?

and isn't 0 an actual sql date?