Joseph <[EMAIL PROTECTED]> wrote:
> I have a table I use to keep track of referred users on my top list. Below
> you will find the four columns in my table. What I need to do is keep
> entries (rows) unique based on the linkid, ipaddress, and the clicktype so
> that a user is not counted twice if they enter my site. Can someone tell
> me what I need to do?
> 
> historyid int(11) primary key
> linkid int(11)
> ipaddress varchar(15)
> clicktype char(3)
> 

You can add UNIQUE key on these four columns using ALTER TABLE command:
        http://www.mysql.com/doc/en/ALTER_TABLE.html

or CREATE INDEX command:
        http://www.mysql.com/doc/en/CREATE_INDEX.html



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to