请告诉我如何在 mysql 中配置数据,以便它可以与下面提到的 PHP 代码一起使用。
我不知道 $GYAZO_DB_PREFIX 是什么。在自述文件中,他们告诉它是 // 数据库表前缀。
如果是数据库表前缀怎么加呢?
还有什么是用户 ID 和用户 IP。它们是字段还是 saprate 表?
任何帮助,将不胜感激。
Assuming you set $GYAZO_DB_PREFIX = 'yourdb_'
,
then, your table's name would be yourdb_members
, yourdb_table1
, etc. The DB prefix is usually configured by the user, or could be left blank, if your tables are going to be named 'members', 'table1'
, etc.
UserID & UserIP are both columns in the table yourdb_members
.
You are trying to store UserID and UserIP in that table. If the userid exists, you are updating UserIP.
As @Truth said, mysql_ functions are going to be deprecated soon, so refrain from using them.