Databases Reference
In-Depth Information
SQL options are used to define exactly what information the export will contain. The
following screenshot depicts the general SQL options:
The general SQL options are:
•
Additional
custom
header
comment
: We can add our own comments for
this export (for example,
Monthly
backup
), which will show in the export
headers (after the PHP version number). If the comment has more than one
line, we must use the special character
\n
to separate each line.
•
Display
foreign
key
relationships
: In
Chapter
10
, we will see that it's possible
to define relations even for tables under the
MyISAM
storage engine; this
option would export these relationship's definition as comments. These
cannot be directly imported, but nonetheless are valuable as human-readable
table information.
•
Display
MIME
types
: This adds information (in the form of SQL comments),
to describe which MIME type has been associated to columns.
Chapter
16
explains this further.
•
Enclose
export
in
a
transaction
: Starting with MySQL 4.0.11, we can use
the
START
TRANSACTION
statement. This command, combined with
SET
AUTOCOMMIT=0
at the beginning and
COMMIT
at the end, asks MySQL to
execute the import (when we will re-import this file) in one transaction,
ensuring that all the changes are done as a whole.
Search WWH ::
Custom Search