Skip to content
Advertisement

Multiple Uniques MYSQL

I have some code im trying to get working. What im looking for is to have it so that i query a site, then display results and upload to database. I want it to ignore duplicates which i have working by checking the date. issue im having is when a user searches for another stock ticker it does not insert into DB because the date is the same. Anyone have any suggestions?

JavaScript

I have set date to unique but i know that is prob my issue. How can i have this so that it checks both name and date and if match to ignore

Advertisement

Answer

I have set date to unique but i know that is prob my issue

This is most probably the issue. Why don’t you use another column to uniquely identify a row?

http://en.wikipedia.org/wiki/Unique_key

“..Each unique key is composed from one or more data attributes of that data entity..”

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement