I am using MySQL to store the RSS feed contents that are updated every few hours. I truncate the database once a day. But during the day, whenever same feeds are updated every few hours I get duplicate entries piled up. Is there any PHP script that I can run to remove those duplicate entries?
s0bigg
0
Newbie Poster
Recommended Answers
Jump to PostWhy not make that entry a unique index, then you can use a query that updates that index if it cannot be inserted (due to it being already there).
http://dev.mysql.com/doc/refman/5.6/en/insert-on-duplicate.html
Jump to PostSet column `title` as primary key or unique index.
All 6 Replies
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
s0bigg
commented:
Thank you sir!
+1
s0bigg
0
Newbie Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
s0bigg
0
Newbie Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
s0bigg
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.