SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    phpMyAdmin inserting display width with INT datatype

    Hi everyone,

    I'm using phpMyAdmin to create a database and have noticed that if I give a column a datatype of INT, and I don't specify the optional display width, it still automatically inserts a display width of 10. I mean I thought the display width was optional so I don't know why it's forcing one. Does anyone know why this happens?

    Also, I'm trying to rename a table using the sql tab with the following code:

    RENAME TABLE Categories TO categories

    ...but it's saying that the table already exists. It does exist but I just want the name to be in lowercase - is there a way to do this?

    Appreciate any advice.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    regarding the display width, just ignore it

    as for your table rename, check da manual under the topic "Identifier Case Sensitivity"
    In MySQL, databases correspond to directories within the data directory. Tables within a database correspond to at least one file within the database directory (and possibly more, depending on the storage engine). Consequently, the case sensitivity of the underlying operating system determines the case sensitivity of database and table names. This means database and table names are not case sensitive in Windows, and case sensitive in most varieties of Unix.
    there's lots more, go have a look
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great - thanks.

  4. #4
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IIRC in your my.ini file change the environment variable: lower_case_table_names to 2 to get case sensitive naming in Windows.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •