Yohanne Posted March 21, 2014 Share Posted March 21, 2014 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? Quote Link to comment https://forums.phpfreaks.com/topic/287147-duplicate-entry-with-a-series-number/ Share on other sites More sharing options...
fenway Posted March 27, 2014 Share Posted March 27, 2014 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. Quote Link to comment https://forums.phpfreaks.com/topic/287147-duplicate-entry-with-a-series-number/#findComment-1474170 Share on other sites More sharing options...
Psycho Posted March 27, 2014 Share Posted March 27, 2014 There's all sorts of tomfoolery you can do with FIND_IN_SET(), but I don't recommend it. +1 for the use of the word "tomfoolery". Quote Link to comment https://forums.phpfreaks.com/topic/287147-duplicate-entry-with-a-series-number/#findComment-1474192 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.