Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[HELP]DUPLICATE ENTRY MYSQL
14-03-2012, 03:58 PM,
Post: #1
[HELP]DUPLICATE ENTRY MYSQL
[Image: DUPLICATE.png]


TERJADI DUPLICATE ENTRY NI AKIBAT DARI PERSAMAAN PRIMARY KEY CAMNNER NK SOLVE KAN..SEDANGKAN COLUMN LAEN VALUE NYA X SAMA

BAGI TABLE DIATAS
Angry

sharing your knowledge to grow your knowledge...

and the knowledge is life not death
Reply
14-03-2012, 04:05 PM,
Post: #2
RE: [HELP]DUPLICATE ENTRY MYSQL
primary key tak boleh sama, mesti unique. setiap row mesti unique.
[Image: GteM3.png]
Reply
14-03-2012, 04:09 PM, (This post was last modified: 14-03-2012, 04:09 PM by Fakhru.)
Post: #3
RE: [HELP]DUPLICATE ENTRY MYSQL
Quote: SQL PRIMARY KEY Constraint

The PRIMARY KEY constraint uniquely identifies each record in a database table.

Primary keys must contain unique values.

A primary key column cannot contain NULL values.

Each table should have a primary key, and each table can have only ONE primary key.
Code:
http://www.w3schools.com/sql/sql_primarykey.asp


Spoiler:
Caps Lock GayFace
Derpina

Reply
14-03-2012, 04:09 PM,
Post: #4
RE: [HELP]DUPLICATE ENTRY MYSQL
PAH2 NK FIX CAMNER SUHZ ....SBAB DATA DIA BG CAM 2
Angry

sharing your knowledge to grow your knowledge...

and the knowledge is life not death
Reply
14-03-2012, 04:14 PM,
Post: #5
RE: [HELP]DUPLICATE ENTRY MYSQL
(14-03-2012, 04:09 PM)pronet Wrote: PAH2 NK FIX CAMNER SUHZ ....SBAB DATA DIA BG CAM 2

So x perlu letak la primary key tu kot..
Derpina

Reply
14-03-2012, 06:41 PM,
Post: #6
RE: [HELP]DUPLICATE ENTRY MYSQL
guna INSERT IGNORE INTO xbleh?
Linux Power User
RedHat

GayFace
Reply
15-03-2012, 06:31 AM,
Post: #7
RE: [HELP]DUPLICATE ENTRY MYSQL
http://en.wikipedia.org/wiki/Database_normalization
Reply
15-03-2012, 11:42 PM, (This post was last modified: 15-03-2012, 11:50 PM by nikkor.)
Post: #8
RE: [HELP]DUPLICATE ENTRY MYSQL
NoPel tu memang ada yg sama ke? data yg die bagi macam mana?

try ko wat camni.
Code:
CREATE TABLE IF NOT EXISTS `gred` (
  `id` int(3) NOT NULL AUTO_INCREMENT,
  `NoPel` varchar(10) NOT NULL,
  `KodKursus` varchar(10) NOT NULL,
  `MataGred` varchar(5) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;
Reply
13-12-2012, 03:13 AM, (This post was last modified: 13-12-2012, 03:22 AM by Timon.)
Post: #9
RE: [HELP]DUPLICATE ENTRY MYSQL
ada buat ER diagram x ?

aku rasa table kau tak sampai 2NF
[Image: Captu3re.jpg]
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [help]mysql foreign key cannot add in table pron3t 6 1,346 13-12-2012, 03:19 AM
Last Post: Timon

Forum Jump: