On MySQL 4.1 and above all queries with date values in
it fail. This happens because MySQL changed the format
of the returned value of typ timestamp. Before the
format was a number. In this version of MySQL the
format is in form "yyyy-mm-dd hh:MM:ss".
A possible solution is to quote the value which is
inserted in the select string.
example from forum_lib.php:
$sql="select (forums.date>$newDate) from forums where
$sql="select (forums.date>'$newDate') from forums where
Above is one errormessage from the OPT system:
The following query failed:
select (forums.date>2005-02-24 18:12:34) from forums
You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the
right syntax to use near '18:12:34) from forums where
id=1' at line 1
This error occured while xxxx was accessing
The user came here from
Please make sure you include the lines above when
submitting a bug report!
Log in to post a comment.