Answered: new variable create?

Post date: 2021-01-19 23:47:13
Views: 218

The function qa_opt() can be used for both setting and getting an option value.

qa_opt('site_titlex', 'test forum ...')  # set value
$var = qa_opt('site_titlex')             # get value

Options are stored in the database table qa_options:

MariaDB db]> describe qa_options;
+---------+----------------+------+-----+---------+-------+
| Field   | Type           | Null | Key | Default | Extra |
+---------+----------------+------+-----+---------+-------+
| title   | varchar(40)    | NO   | PRI | NULL    |       |
| content | varchar(12000) | NO   |     | NULL    |       |
+---------+----------------+------+-----+---------+-------+
2 rows in set (0.01 sec)

so you could also manually add an option to the database

INSERT INTO qa_options VALUES ('site_titlex', 'test forum ...');

and then just use qa_opt('site_titlex') in Q2A.

Please click Here to read the full story.
 
Other Top and Latest Questions:
McDonald's is hosting an investor day as its U.S. business struggles. Here are 4 things to expect
Oil little changed after Trump tells UN that Iran will make a deal after midterm elections
Novo defends diversification push as CEO eyes deals beyond obesity
September surge or October offload? Jobs experts weigh in on this fall’s hiring trends
Snowpiercer: The First Blow Rewatch
phone games that get you into flow state
How would you make the most of a micromanaging supervisor?
Trump slams Iran and Cuba, defends AI growth and recounts record in UN speech
Trump, Xi seek trade stability and deals, but AI, tariffs and Iran loom large. What to watch
Iran reportedly says it can reopen Strait of Hormuz within 7 days if U.S. eases military pressure