On 2004-01-07, Paul Beckett <pa**********@lineone.net> wrote:
I have successfully used strtotime to format the date on a webpage that is
pulled form a MySQL database in the form yyyy-mm-dd.
However, in another part of the webpage, I have to insert another date that
may contain a NULL entry in the database. If I use strtotime to format this
then it enters the current date, whereas I want it left blank.
You already posted this question elsewhere. If you really want to post
it in multiple groups, do it as a crosspost. Because now you are
multiposting and that is evil. (If you dont know what
multiposting/crossposting are, use google or something like that to find
an introduction to usenet netiquette)
Anyway, you could use the IFNULL function in MySQL.
As you get the date from MySQL, i don't see why you let MySQL doe the
date_format instead of using php.
--
http://home.mysth.be/~timvw