简体   繁体   中英

How to select a row in a MySql table by Username and Key and insert data in that row

I want to make a PHP Script for selecting a row by Username and Key from the Table, then inserting data into that row.

How would I go about this?

As far as I understand, you're trying to update a specific row. That can be done with a simple SQL statement.

UPDATE table_name SET user_ip = input_user_i WHERE username = your_username AND key = your_key

I think / hope you know how to query the database with PHP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM