The date I select isn't out of range (it must be in 2004 I think).
I know that I can use a DATE_FORMAT(), but I think it's more simple for me to get an UNIX_TIMESTAMP and then to convert the date ; cause I want to have the day, month and year of the date in different variables.
If I use an UNIX_TIMESTAMP, I just have to select one field, and then to convert the result of the query using the php function date() :
$day=date('d',$timestamp);
$month=date('m',$timestamp);
etc
If I want to do the same with DATE_FORMAT, I will have to select the date field 3 times as following
DATE_FORMAT('%d',date_field) as day, DATE_FORMAT('%m',date_field) as month
I think the second case is heavier.
But what I really don't understand is that the same kind of query with UNIX_TIMESTAMP upon other tables works perfectly. I know I can get the result with DATE_FORMAT but I don't want to do that way without knowing why it didn't work with the UNIX_TIMESTAMP. There are no reason (I can't see one) the UNIX_TIMESTAMP doesn't work in that case, so until I've found the reason I consider that using the DATE_FORMAT isn't safer ; why should it work in evry case if the UNIX_TIMESTAMP don't ? So I want to prevent any further problem.