db php question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a very crude script set up that I am using to keep track of IP
addresses, MAC addresses, etc and it dumps into mysql.  I am using a
column called "id" which is my primary key and auto-increments.  My
question is that I want to make sure that I don't get duplicate IP
addresses added into the database and right now it is a varchar field
and anything can be put in there.  If I change the column and make it my
primary key will that prohibit duplicate entries?  Is there a better way
to do this?  I am not a programmer either so I am having to hack my way
through this.  The second thing that I wanted to do was to be able to
run a simple web form search for either ip addresses or computer name
and return results.  From what I have seen this seems pretty complex -
any thoughts?
thanks,
DF

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux