I have some insurance information in a website, and I'd like to only edit certain fields the user wants to change like for example: user, id, phone, address, city
and the user wants to change his city and phone...do i have to make a query for each specific case or is there a code that can help me retrieve the key(phone) and value (9397171602)??
to then send it in a query
Basic update would take the form of:
UPDATE table_name SET column_1 = value_1, column_2 = value_2 WHERE column_3 = value_3
Where col1, col2 would be your city and phone, and col3 would be the user id. Check out the MySQL website http://dev.mysql.com/doc/refman/5.0/en/update.html for more info
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With