PHP
  Home arrow PHP arrow Page 2 - 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 - Editing Field Attributes


    (Page 2 of 7 )

    On the Structure sub-page, we can make further changes to our table. For this example, we have set $cfg['PropertiesIconic'] to 'both' to see both the icons along with their text explanation:

    phpMyAdmin

    This panel does not allow every possible change to fields. It specifically allows:

    • Changing one field structure, using the Change link on a specific field
    • Removing a field: Drop
    • Adding a field to an existing Primary key
    • Setting a non-unique Index or a Unique index on a field
    • Setting a Fulltext index (offered only if the field type allows it)

    These are quick links that may be useful in specific situations. Keep in mind that they do not replace the full index management panel, or the full field structure panel. Both are explained in this chapter.

    We can also use the checkboxes to choose fields, and with the appropriate With selected icons, Edit the fields or do a multiple field deletion with Drop. The Check All / Uncheck All option permits us to easily check or uncheck all boxes.

    TEXT Fields

    We will now explore how to use the TEXT field type and the relevant configuration values to adjust for the best possible phpMyAdmin behavior.

    First we add a TEXT field called description:

    phpMyAdmin

    There are three parameters that control the layout of the text area that will be displayed in Insert or Edit mode for the TEXT fields.

    First, the number of columns and rows for each field is defined by:

    $cfg['TextareaCols'] = 40;
    $cfg['TextareaRows'] = 7;

    This gives (by default) the following space to work on a TEXT field:

    phpMyAdmin

    The settings do not impose a limit other than visual, and a vertical scroll bar is created by the browser, should it be necessary.


    Although MEDIUMTEXT, TEXT, and LONGTEXT columns can accommodate more than 32K of data, current browsers cannot always edit them with the mechanism offered by HTML: a text area. In fact, experimentation has convinced the phpMyAdmin development team to have the product display a warning message if the contents are larger than 32K, telling users that it might not be editable.

    For LONGTEXT fields, setting $cfg['LongtextDoubleTextarea'] to TRUE doubles the available editing space.

    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 1 hosted by Hostway
    Stay green...Green IT