Prev | Current Page 110 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"

It makes sense to expand
our author_id index, adding the language field to it.
??? ??? ??? ???
Changing Table Structures
[ 110 ]
We click the Edit link (small pencil) on the line containing the author_id index; this
brings us to the following panel, which shows the current state of this index:
Next, we choose Add to index 1 column(s); we then click Go. We select the language
field on the next panel. This time we do not have to enter a size since the whole field
will be used in the index:
Chapter 6
[ 111 ]
For better documentation, we can change the Index name (author_language is
appropriate). We save this index modification and we are back to:
FULLTEXT Indexes
This special type of index allows for full-text searches. It is supported only on MyISAM
tables for VARCHAR and TEXT fields. We can use the Fulltext quick link
in the fields list or go to the index management panel and choose Fulltext in the
drop-down menu:
We want a FULLTEXT index on the description field so that we are able to locate
a book from words present in its description. After the index has been created, it
looks like:
Depending on the MySQL version, we might see 1 as the field length for the newly
created index. In fact, MySQL does not support the idea of an index length for
FULLTEXT indexes: the index is always on the whole field, but this 1 would be the
value reported by MySQL.


Pages:
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122