Ask for advice on MySQL data sheet problems, which is used to store configuration information.

I want to create a table to store the configuration information of the website, but I don"t need to add the whole ID into one column. What do you care about this kind of information?

Mar.06,2021

you can have a single line of information, such as the name of the website is a row of data, the URL of the site is a piece of data, logo is a piece of data, and so on. Most of them are designed in this way. Something like this:



A table with two fields, one field for key, and one field for value, can optionally add a third field to record who modified and modified the time


encapsulate a class
config.get (key)
config.set (key, value, expire)

config_ setting table
1.key key
2.value value
description of 3.hint (optional) key
expiration time of 4.expire (optional) key

Menu