MySQL Forums
Forum List  »  PHP

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

Sorry my miss understanding of concurrency. Is there not logic in my table set-up to prevent values from other sources/tables from influencing the outcome? postId in my posts table is set to auto_increment and is the pk therefore must be unique. postId in my images tables is defined as a foreign key and is referenced to the parent table.
The image stable may have many rows with an display order of for example 2 but each one of them would have a unique postId value, this seems logical. So given the above structure, how could SELECT display_order FROM ext_images WHERE parentId = XX ORDER BY display_order DESC LIMIT 1 possibly not return the highest value? I can't understand where the logic could break down.

Options: ReplyQuote

Written By
Re: Duplicate values being created
January 25, 2018 04:23PM

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.