MySQL Forums
Forum List  »  PHP

Re: Duplicate values being created
Posted by: Robert Summerfield
Date: January 25, 2018 03:58PM

the tables (relevant rows) are created as follows:

postId INT UNSIGNED not null auto_increment
PRIMARY KEY (postId)

imgId INT UNSIGNED not null auto_increment
postId INT UNSIGNED null
displayOrder SMALLINT not null
PRIMARY KEY (imgId)
INDEX (postId)
FOREIGN KEY (postId)
REFERENCES posts(postId)
ON DELETE CASCADE
ON UPDATE CASCADE

Anything look out of place? Would this structure not prevent concurrency?

Options: ReplyQuote


Subject
Written By
Posted
Re: Duplicate values being created
January 25, 2018 03:58PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.