30,997
edits
Tags: Mobile edit Mobile web edit |
Tag: 2017 source edit |
||
| Line 292: | Line 292: | ||
'MU' (for unit prices), 'MT' (for total prices) or 'MS' (otherwise) depending on usage of number. (see function documentation) | 'MU' (for unit prices), 'MT' (for total prices) or 'MS' (otherwise) depending on usage of number. (see function documentation) | ||
* Date functions NOW, SYSDATE or DATEDIFF are forbidden inside SQL requests. 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 better portability of code | * SQL Date functions NOW, SYSDATE or DATEDIFF are forbidden inside SQL requests. 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 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 performance (see example and final comment) | |||
For example, don't do: | For example, don't do: | ||