PHP and MySQL syntax: Difference between revisions

Jump to navigation Jump to search
add Format a number
(add Format a number)
Line 46: Line 46:
* [http://dev.mysql.com/doc/refman/5.0/en/datetime.html MySQL  The DATETIME, DATE, and TIMESTAMP Types]
* [http://dev.mysql.com/doc/refman/5.0/en/datetime.html MySQL  The DATETIME, DATE, and TIMESTAMP Types]
* [http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html MySQL  Date and Time Functions]
* [http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html MySQL  Date and Time Functions]
== Format a number ==
* 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


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

Navigation menu