PHP
  Home arrow PHP arrow Page 6 - Changing Table Structure in phpMyAdmin
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Changing Table Structure in phpMyAdmin
By: Marc Delisle
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2004-09-28

    Table of Contents:
  • Changing Table Structure in phpMyAdmin
  • Editing Field Attributes
  • BLOB (Binary Large Object)
  • ENUM and SET
  • Index Management
  • Multi-Field Indexes and Index Editing
  • Table Optimization: EXPLAIN a Query

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Changing Table Structure in phpMyAdmin - Multi-Field Indexes and Index Editing


    (Page 6 of 7 )

    In the next example, we will assume that in a future application we will need to find the books written by a specific author in a specific language. It makes sense to expand our author_id index, adding the language field to it.

    We click the Edit link (small pencil) on the line containing the author_id index and choose to add one column to this index as shown in the following screenshot:

    phpMyAdmin

    We select the language field on the next panel. This time we do not have to put a size since the whole field will be used in the index:

    phpMyAdmin

    For better documentation, we should also change the key name (author_language would be appropriate). We save this index modification and we are back to:

    phpMyAdmin

    FULLTEXT Indexes

    This special type of index allows for full-text searches. It is supported on tables of type MyISAM 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:

    phpMyAdmin

    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 creation, the index list looks like:

    phpMyAdmin

    Seeing 1 as the field length here might be surprising. 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 is the value reported by MySQL.

    phpMyAdminThis chapter is from Mastering phpMyAdmin for Effective MySQL Management by Marc Delisle (Packt Publishing, April 2004, ISBN 1904811035). Check it out at your favorite bookstore today.

    Buy this book now.

    More PHP Articles
    More By Marc Delisle


     

       

    PHP ARTICLES

    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT