Hi, I have a query where I find out if a date in the database is empty or not:
…
Marriage_date’ => ‘if(Marriages.date != 0000-00-00, Marriages.date, “no date recorded”)’,
…
If I execute the query for example in phpmyadmin, it works, if there is no date it returns “no date recorded” but in cakephp, when recovering in the view the marriage_date field, it returns a numeration that does not make sense, on the other hand if there is date, it returns the correct date. Why not return the string if the date is 0000-00-00?