Prev | Current Page 116 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"

In fact, it would contain the full hexadecimal representation of
the cover_photo field of this book.
The first part of the export comprises comments (starting with the characters, --) that
detail the utility (and version) that created the file, the date, and other environment
information. We then see the CREATE and INSERT queries for each table.
Starting with version 2.6.0, phpMyAdmin generates ANSI-compatible
comments in the export file. These comments start with --. They help
with importing the file back on other ANSI SQL-compatible systems. In
previous versions, the MySQL-specific character, '#', was used.
SQL Options
SQL options are used to define exactly what information the export will contain. We
may want to see the structure, the data, or both. Selecting Structure generates the
section with CREATE queries, and selecting Data produces INSERT queries:
Exporting Structure and Data
[ 120 ]
The general SQL options are:
Add custom comment into header: 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.
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.


Pages:
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128