Jump to content

Recommended Posts

Hi coders,

 

how mysql works to find duplicate entry or  ignore duplicate entry in a series number. example below

 

 |---     id    ---|---    series_stack_num     -----|

 |------------------------------------------------------|

 |-       1       -|-    0000,0001,0002,0003      -|

 |------------------------------------------------------|

 |-       1       -|-    0000,0004,0003,0006      -|

 |------------------------------------------------------|

 |-       1       -|-     0007,0007,0005,0008      -|

 |------------------------------------------------------|

 

if you notice 0000, 0003 and 0007 are duplicate and now it is possible mysql can trigger duplicate in like this situation?  

 

      

Link to comment
https://forums.phpfreaks.com/topic/287147-duplicate-entry-with-a-series-number/
Share on other sites

Duplicate should be referring to individual field values, not parts of a field -- storing delimited data that you need to consider separately is likely going to bite you soon enough, if it hasn't already.

 

There's all sorts of tomfoolery you can do with FIND_IN_SET(), but I don't recommend it.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.