[英]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. 我想制作一个PHP脚本,用于通过“
Username
和“ Key
从表中选择一行,然后将数据插入该行。
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.
这可以通过一个简单的SQL语句来完成。
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. 我认为/希望您知道如何使用PHP查询数据库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.