Post Reply  Post Thread 
key u MySQL tablici
Author Message
hamferus
Forumaš
***


Posts: 352
Group: Registered
Joined: Jun 2006
Status: Offline
Reputation: 8
Post: #1
key u MySQL tablici

Znam kako napraviti primery key(označi se gumb), al me zanima kako napraviti običan key u tablici pošto nemogu importirati tablicu u wamp

evo tablica koju želim rekonstruirat


Code:
CREATE TABLE Clients (
  PkClient int(12) NOT NULL auto_increment,
  Email varchar(255) NOT NULL default '',
  Password varchar(255) NOT NULL default '',
  Name varchar(255) NOT NULL default '',
  Address varchar(255) NOT NULL default '',
  City varchar(255) NOT NULL default '',
  State varchar(255) NOT NULL default '',
  Country varchar(255) NOT NULL default '',
  Zip varchar(10) NOT NULL default '',
  Phone varchar(15) NOT NULL default '',
  SName varchar(255) NOT NULL default '',
  SAddress varchar(255) NOT NULL default '',
  SCity varchar(255) NOT NULL default '',
  SState varchar(255) NOT NULL default '',
  SCountry varchar(255) NOT NULL default '',
  SZip varchar(10) NOT NULL default '',
  SPhone varchar(15) NOT NULL default '',
  Credit_Card varchar(255) NOT NULL default '',
  Credit_Number varchar(255) NOT NULL default '',
  Expiration date NOT NULL default '0000-00-00',
  PRIMARY KEY (PkClient),
  KEY Email(Email),
  KEY Password(Password)
) TYPE=MyISAM;



Mene zanima key gdje su email i password

fala


PHOTO - http://www.hamferus.com
VIDEO - http://www.metacafe.com/f/channels/hamferus/
RC WORLD - http://rcfanatic.blogspot.com
FLASH TUTORIJALI - http://blog.hamferus.com
21-03-2007 11:10 PM
Visit this user's website Find all posts by this user Quote this message in a reply
d@d
Forumaš
***


Posts: 552
Group: Registered
Joined: May 2006
Status: Offline
Reputation: 9
Post: #2
RE: key u MySQL tablici

Kako misliš običan key? Treba ti ime polja, tip podatka (char, int, text), duljina znakova i ako je int staviš not null ili neku default vrijednost. Dobro je stavit i collation jer novije verzije mysql-a ne toleriraju pogreške s hrv znakovima


http://www.justbeonline.net @ web katalog
jel bitno??!?
22-03-2007 09:57 PM
Visit this user's website Find all posts by this user Quote this message in a reply
hamferus
Forumaš
***


Posts: 352
Group: Registered
Joined: Jun 2006
Status: Offline
Reputation: 8
Post: #3
RE: key u MySQL tablici

Taj obični key je index to sam uspio dobit jučer navečer kad sam uploado.sql file na svoju stranicu i potražio malo po phpmyadnimu i našo da je to index.

Tako jednostavno al kad tek učiš zna bit naporno i teško.


PHOTO - http://www.hamferus.com
VIDEO - http://www.metacafe.com/f/channels/hamferus/
RC WORLD - http://rcfanatic.blogspot.com
FLASH TUTORIJALI - http://blog.hamferus.com
23-03-2007 12:06 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: