how get value attribute from mysql and set another attribute in same table