how can I replace a record in my DB (mySql) by new record?
I'm working on centos 6.5
and I have manged to do an insert query
mysql -u root --password='pw' MatchingDB
> INSERT INTO USER_MACTable (USER, MAC) VALUES ('$user','$mac');
my question is:
how to modify the insert query above to let it replace an existing record when the MAC attribute is duplicated and to insert a new record normally when the MAC attribute isn't duplicated using phpmyadmin queries?
Last edited by ngiw2012; 06-05-2014 at 06:26 AM.
|