Line 294:
Line 294:
* SQL Date functions NOW, SYSDATE or DATEDIFF are forbidden inside SQL requests. Other functions like (MONTH, YEAR) must also be avoided if possible. If you must use the current date into a field, value must come from the PHP and not from the database engine. This is for 3 reasons:
* SQL Date functions NOW, SYSDATE or DATEDIFF are forbidden inside SQL requests. Other functions like (MONTH, YEAR) must also be avoided if possible. If you must use the current date into a field, value must come from the PHP and not from the database engine. This is for 3 reasons:
** better portability of code
** better portability of code
−
** better management of TimeZone (reference timezone is the PHP timezone and timezone of database may differs so all dates functons must be on PHP side).
+
** better management of TimeZone (reference timezone is the PHP timezone and timezone of database may differs so all dates functions must be on PHP side).
** better performance (see example and final comment)
** better performance (see example and final comment)