DateTime::sub

It subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object
Example

<?php
$date = new DateTime(‘2012-05-17’);
$date->sub(new DateInterval(‘P11D’));
echo $date->format(‘Y-m-d’) . “n”;
?>

Output

2012-05-06

date_sub

Its an alias of DateTime::sub()and subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object
Example

<?php
$date = date_create(‘2012-05-17′);
date_sub($date, date_interval_create_from_date_string(’11 days’));
echo date_format($date, ‘Y-m-d’);
?>

Output

2012-05-06


date_parse

It returns associative array with detailed info about given date

Example

<?php
echo “<pre>”;
print_r(date_parse(“2006-12-12 10:00:00.5”));
?>

Output

Array
(
[year] => 2006
[month] => 12
[day] => 12
[hour] => 10
[minute] => 0
[second] => 0
[fraction] => 0.5
[warning_count] => 0
[warnings] => Array
(
)

[error_count] => 0
[errors] => Array
(
)

[is_localtime] =>
)

date_parse_from_format

It returns details  about given date formatted according to the specified format.

Example

<?php
echo “<pre>”;
$date = “20.4.2008”;
print_r(date_parse_from_format(“j.n.Y H:iP”, $date));
?>

Output

Array
(
[year] => 2008
[month] => 4
[day] => 20
[hour] =>
[minute] =>
[second] =>
[fraction] =>
[warning_count] => 0
[warnings] => Array
(
)

[error_count] => 1
[errors] => Array
(
[9] => Data missing
)

[is_localtime] =>
)


BLACKHOLE storage engine

The BLACKHOLE storage engine accepts data but does not store anything . So on retrieval it will return nothing .

When we create BLACKHOLE table the server will create file with name starts with table name with extension .frm . No other tables will be generated as it stores nothing .

It supports all types of indexes .

Though nothing is stored , the query statements get stored if binary logs are enabled .

It does not support AUTO INCREMENT

CSV Storage Engine

The ARCHIVE storage engine is used for storing large amounts of data without indexes in a very small footprint.

When you create an ARCHIVE table, the server creates a table format file in the database directory. The file begins with the table name and has an .frm extension. The storage engine creates other files, all having names beginning with the table name. The data and metadata files have extensions of .ARZ and .ARM, respectively. An .ARN file may appear during optimization operations.

The ARCHIVE engine supports INSERT and SELECT, but not DELETE, REPLACE, or UPDATE. It does support ORDER BY operations, BLOB columns


ARCHIVE Storage Engine

The ARCHIVE storage engine is used for storing large amounts of data without indexes in a very small footprint.

When you create an ARCHIVE table, the server creates a table format file in the database directory. The file begins with the table name and has an .frm extension. The storage engine creates other files, all having names beginning with the table name. The data and metadata files have extensions of .ARZ and .ARM, respectively. An .ARN file may appear during optimization operations.

The ARCHIVE engine supports INSERT and SELECT, but not DELETE, REPLACE, or UPDATE. It does support ORDER BY operations, BLOB columns