UniverseUniversity


Home Projects Jobs Clientele Contact

uu


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Root category ID



My general rule - never have any id = 0. It was pretty painful to understand
it in the past. In simple words - this rule saves you in some data
conversions when NULL is converted to 0.
In my systems, 0 is an incorrect ID.

2009/6/22 Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>

> Why did you need to make it 1?
> It is lot easier if it's 0 (aka FALSE in C++).
> Makes things lot easier when it isn't present as
> explicit parameter.
>
> --
> Ilya A. Volynets-Evenbakh
> http://www.total-knowledge.com
>
>


-- 
Alexey Parshin,
http://www.sptk.net

Authoright © Total Knowledge: 2001-2008