#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    26
    Rep Power
    0
    Hello all,

    I currently have an account with a hosting service (they donot provide Php and Mysql support) that provides phpMyAdmin 2.0.1 system. The main problem I am trying to solve is how do I insert the following KEY expressions using the phpMyAdmin 2.0.1 software?. Entering the uid, login and passw is no problem using inserting a new field. Do I have to use insert new fields as well to input the KEY functions ?

    Regards

    Richard
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    Seaside, CA
    Posts
    84
    Rep Power
    15
    If you've already created the fields, display the table properties, then click on "Primary," "Index," or "Unique" to the right of the field. That will create the key. If you want to make the field autoincrementing, then click on "change" and use the pull-down menu at the very right of the resulting screen.

    If you're trying to create the key while you're creating the fields, I know there are checkboxes to do that. However, on the servers I use, it often won't work. So, I gave up and now just create the keys after creating the fields.

    Note that I'm using 2.0.5 and I don't recall the interface for 2.0.1 so all this may not apply.

    ------------------
    From the day we're born, we're running out of time.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    26
    Rep Power
    0
    Thank you for your reply, BUT....

    The admin display that I have consists of the following colums:

    Field : Type : Length/set : Attributes : Null: Default: Extra : Primary : Index : Unique

    So from the following code the initial 4 lines of code is not a problem

    CREATE TABLE user (
    uid SMALLINT NOT NULL,
    login VARCHAR (12),
    passw VARCHAR (12),
    KEY (uid),
    KEY (login),
    KEY (passw)
    );

    The values that I have inserted using phpMyAdmin 2.0.1 are as follows:

    Field:
    Type: TINYINT
    Length: uid
    Attributes:
    Null: not null
    Default:
    Extra:
    Primary:
    Index:
    Unique:

    But it results in error. The documentation on the administration software is not detailed to my inquiry. Iam sure what Iam asking is a very simple question.

    Regards

    Richard

  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    26
    Rep Power
    0
    I have since continued my quest...

    The following is my dump file. Iam however concerned that the KEY uid (uid), contains the uid between the KEY and (uid)- will this still work??

    Regards

    Richard


    # phpMyAdmin MySQL-Dump
    #
    # Host: localhost Database : wayhawke_com
    # --------------------------------------------------------

    #
    # Table structure for table 'user'
    #

    CREATE TABLE user (
    uid smallint(6) DEFAULT '0' NOT NULL,
    login varchar(20) NOT NULL,
    passw varchar(32) NOT NULL,
    KEY uid (uid),
    KEY login (login),
    KEY passw (passw)
    );

  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    Seaside, CA
    Posts
    84
    Rep Power
    15
    Seems right to me. Are you having trouble pulling data out of the table?
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    26
    Rep Power
    0
    Thanks Joel


    I had not yet tried using the code as I am in early development stages. I wanted to get on the right track to start with.

    My concern was that the KEY uid (uid), contains the uid between the KEY and (uid)- and was questioning if this is usual when you view the dump file?

    Regards

    Richard

  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    32
    Rep Power
    15
    Yeah, phpmyadmin displays the key name followed by the fields it contains in ().

Similar Threads

  1. MySql & phpMyAdmin on home WinXP
    By mdhall in forum MySQL Help
    Replies: 2
    Last Post: October 28th, 2003, 03:48 PM
  2. phpMyAdmin and Zend Studio
    By Lars3 in forum MySQL Help
    Replies: 2
    Last Post: July 19th, 2003, 12:27 PM
  3. How to Dump SQL data via phpMyAdmin.
    By YCoco in forum MySQL Help
    Replies: 4
    Last Post: February 10th, 2003, 11:57 AM
  4. Installing gd 2.0.1?
    By JagXJ220 in forum PHP Development
    Replies: 1
    Last Post: October 30th, 2001, 06:29 AM
  5. phpMyAdmin Problems!
    By mills in forum MySQL Help
    Replies: 5
    Last Post: June 8th, 2001, 12:21 PM

IMN logo majestic logo threadwatch logo seochat tools logo