FouLu is assuming, which Andrew is not, that the database in use here is MySQL.
In some other database, DATE truly is reserved and cannot be used with the escaping that Andrew noted.
I do have to wonder how useful it is to do
WHERE ... DATE LIKE '%$name%'...
What is the likelihood that a date will look anything at all like a name?
OH! IT JUST OCCURRED TO ME!!! *IF* your MySQL is set to treat WARNINGS the same as ERRORS, then indeed that *COULD* cause an error! Because that code *FORCES* MySQL to convert the DATE field into a VARCHAR field (it can't use LIKE with a DATE field). Normally, that will just get you a warning, that most of us will ignore. But if you are operating in very strict mode, that warning could be treated as an error.
You can, of course, then avoid the warning (and error if you are in strict mode) thusly:
WHERE ... CONVERT(`DATE`, CHAR) LIKE '%$name%' ...
That is, you explicitly tell MySQL that you WANT to convert the date to a string and it is much happier.