From: "Jason Gerfen" <jason.gerfen@xxxxxxxxxxxx>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:
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...
---John Holmes...
+----------+--------------+------+-----+---------+----------------+
| 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; etc.
I have such a hard time with mysql's manual. Jas
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php