1. 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

Discussion in 'XenForo Development Discussions' started by arms, Apr 30, 2014.

  1. arms

    arms Active Member

    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?

Share This Page