The natural idea of time is dates: year, month, day and time: hours, minutes, seconds. In some applications, days of the week and fractions of seconds matter, but in all applications, tools are always needed to process time variables and present them in a natural way.
Time is characterized by a place in the space where the event occurs and a point where it can be used. This is a general procedure that determines the need for localization and time zones.
MySQL: data types for time recording
, MySQL (date, time, timestamp year). : char (20) - MySQL date_format() .
, . , "x_timestamp". MySQL now(). , .
(timestamp) MySQL date_format() . « » . . - .
. , : MySQL date_format () datetime = , . , , . . , .
:
- , , . , -, , :
, , .
MySQL select date_format()
- SQL. , , .
MySQl date_format() , .
: "x_timestamp" "x_datetime". , , PHP, date MySQL format .
. « » «%*», : , , , .
MySQL - SQL. , , MySQL date_format().
, 12- "AM" "PM". , SQL.
, SQL, , "". , , "" () .
, , .
, , , , . , , . , , .
PHP : . «»:
- private static $iUniqueNo = -1; // ""
- // $iUniqueNo
- // .
- public function IncUniqueNo() {
- if (self::$iUniqueNo > 99)
- self::$iUniqueNo = 0;
- else
- self::$iUniqueNo++;
- }
, : , , , , , $iUniqueNo, : - ("" = "$iUniqueNo") .
MySQL date_format(), , "timestamp" .