Hi Giorgio,
mysql_format_date is not a PHP MySQL function.
It is a function the author defined in the
file lib/functions.php
If you go to the download code and look at
lib/functions.php, you can see he has defined
it there.
It looks like this.
PHP Code:
// accept mm/dd/yy date string and convert to mysql format
function mysql_format_date($date)
{
list($month, $day, $year) = explode('/', $date);
return sprintf('%04d-%02d-%02d', $year, $month, $day);
}
You can add it to your lib/functions.php file and this
should get you around this problem.
BE VERY CAREFUL about downloading the file
lib/functions.php because you already have
a file named lib/functions.php and you don't
want to overwrite it. I like the
idea of just pasting mysql_format_date function
onto the end of your existing lib/functions.php file.
In my opinion, the book should not have named
this function with a name that looks a lot
like a PHP MySQL function. This leads people
to believe it is a PHP MySQL function. Also, the book
did not mention this function in the text.
The only way you would know about it is to
look in the download code.
I hope this helps.