MySQL Forums
Forum List  »  PHP

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

It's not a pk, the table does have an auto increment pk but that is used for row id I have a separate display order column as I need the ability to change the display order. I cannot understand why my select does not always return the highest value. for example if I have 3 rows in the table, display order values 1, 2 & 3, when I run my select to add a 4th row, how could SELECT display_order FROM ext_images WHERE parentId = XX ORDER BY display_order DESC LIMIT 1 return 2?

Options: ReplyQuote

Written By
Re: Duplicate values being created
January 25, 2018 03:28PM

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.