I just want to track unique visitors for each article page.
I made a table with 2 fields. article_id as Primary key and ipas Unique
The expected output should be like :
article_id * IP
52 - 100.200.300.400
52 - 20.30.20.40
52 - 30.40.50.60
93 - 108.207.302.403
93 - 10.30.20.40
But it’s not working, this is what I get :
article_id * IP
52 - 100.200.300.400
93 - 10.30.20.40
I think I set the keys wrong.
When you define
article_idas primary key, you will never have two records with the samearticle_id.To avoid duplication of
article_id+ippairs, you can define a UNIQUE index of both fields:article_idANDip.For example: