PHP and MySQL syntax: Difference between revisions

Jump to navigation Jump to search
Line 43: Line 43:
* [http://www.w3schools.com/php/php_ref_date.asp PHP Date / Time Functions] / [http://www.w3school.com.cn/php/php_ref_date.asp PHP Date / Time 函数]
* [http://www.w3schools.com/php/php_ref_date.asp PHP Date / Time Functions] / [http://www.w3school.com.cn/php/php_ref_date.asp PHP Date / Time 函数]


== Format a number ==
== Math ==
=== Format a number ===
* PHP: [http://php.net/manual/en/function.number-format.php PHP: number_format - Manual]
* PHP: [http://php.net/manual/en/function.number-format.php PHP: number_format - Manual]
* MySQL: LPAD(number,3,0) will output 007 if the value of number is 7
* MySQL: LPAD(number,3,0) will output 007 if the value of number is 7
=== Round a number downward to its nearest integer ===
* [http://php.net/manual/en/function.round.php PHP: round - Manual]
* [http://www.w3schools.com/jsref/jsref_floor.asp JavaScript floor() Method]
* [http://office.microsoft.com/zh-tw/excel-help/HP010062455.aspx ROUND 函數 - Excel - Office.com]


== before delete trigger to make backup of deleted data ==
== before delete trigger to make backup of deleted data ==

Navigation menu