SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Dec 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MYSQL primary key issue on localhost

    Hi Folks, I hope you are all doing well.

    I need some help.

    I installed MySQL, php and the apache webserver.

    I am using the myPhp Admin to create the database for the ijdb in the book Novice to Ninja.

    I am using the GUI to create the table and its columns.

    When I go to structure, the interface shows the 3 columns, but it shows the jokeDate as the primary key.

    When I go to the SQL window and run the describe command it shows the 3 columns, in this view, it does show the ID as the primary key.

    I took a couple of screen shots, I am going to see if I can attach them for every one to view.

    Thanks for the help.

    Jorge Muralles
    info@locopro.com
    Attached Files Attached Files

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,237
    Mentioned
    194 Post(s)
    Tagged
    2 Thread(s)
    Null = No, Default = NULL
    vs.
    Null = No, Default = None

    ??

  3. #3
    SitePoint Member
    Join Date
    Dec 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MYSQL primary key

    Quote Originally Posted by Mittineague View Post
    Null = No, Default = NULL
    vs.
    Null = No, Default = None

    ??
    Thank you very much.

    When the box for NULL is checkek, it allows null values.


    Correct?

    Thank you

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,237
    Mentioned
    194 Post(s)
    Tagged
    2 Thread(s)
    I don't know what you mean by "the null checkbox"

    If you mean the checkbox to the left of each row under the Structure tab, try checking the one next to id and clicking primary.

  5. #5
    SitePoint Member
    Join Date
    Dec 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mysql primary key issue

    Quote Originally Posted by Mittineague View Post
    I don't know what you mean by "the null checkbox"

    If you mean the checkbox to the left of each row under the Structure tab, try checking the one next to id and clicking primary.
    Hi there, I hope you are well.

    Did you get a chance to see the document I attached to the original message?

    The options looked good for the columns.

    The ID is an INT, not null, auto increment and is listed as the primary key.

    Actually it shows as the primary key when I run the describe command.

    It does not show as the primary key when I use the myPHP admin area.

    Take a look at the attachmentscreen shots - small.pdfscreen shots - small.pdf, let me know what you think.


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
  •