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  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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? 
Google.com  
PHP

Changing Table Structure in phpMyAdmin
By: Marc Delisle
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 16
    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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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

    - Adding Ordering and Grouping Clauses to the ...
    - Implementing Factory Methods in PHP 5
    - Merging a File Split for FTP Upload using PHP
    - Getting Data from Yahoo Site Explorer Inboun...
    - Method Chaining: Adding More Selecting Metho...
    - How to Split a File During an FTP Upload Usi...
    - Expanding a Custom CodeIgniter Library with ...
    - Using the Yahoo Site Explorer Inbound Links ...
    - Building a CodeIgniter Custom Library with M...
    - Building an E-mini Trading System Using PHP ...
    - Completing the MySQL Class with Method Chain...
    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek