July 12th, 2000, 10:43 AM
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 ?
July 12th, 2000, 09:17 PM
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.
July 12th, 2000, 10:06 PM
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),
The values that I have inserted using phpMyAdmin 2.0.1 are as follows:
Null: not null
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.
July 12th, 2000, 10:38 PM
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??
# 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)
July 12th, 2000, 11:20 PM
Seems right to me. Are you having trouble pulling data out of the table?
July 13th, 2000, 06:19 PM
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?
July 13th, 2000, 10:13 PM
Yeah, phpmyadmin displays the key name followed by the fields it contains in ().