John W. Holmes wrote:From: "Jason Gerfen" <[EMAIL PROTECTED]>Yeah, I have never used a unique field for the database, and you are right it is a mysql db.
Now is a good time to do it the right way, then...
Yes definately, I am trying to convert my exisiting fields to a unique type and am having no luck what-so-ever. This is the table format:
+----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+----------------+
| id | int(11) | | PRI | NULL | auto_increment |
| hostname | varchar(100) | | | | |
| mac | varchar(100) | | | | |
| ip | varchar(100) | | | | |
| vlan | varchar(100) | | | | |
+----------+--------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)
and this is the command I am tying to run to modify the hostname, mac & ip fields to unique.
alter hosts add unique mac;
alter hosts add unique(mac);
-- ---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php