Answered: new variable create?

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

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:
U.K.-India trade deal faces a stiff test over Scotch whisky import taxes
Lumentum CEO defends Marvell deal after stock plunge: 'We've got work to do' with shareholders
Anthropic IPO 'exactly what the markets need,' but analysts warn of volatility
Kraken parent's acquisition of Tribe Capital flags new chapter in evolution of crypto exchanges
Where do you keep your mail?
Movie: Giant Little Ones
Cathie Wood's ARK Invest was a big buyer of Anthropic, tells CNBC she's 'quite optimistic'
A24 is having a great year at the box office. That could give HBO Max a streaming edge
Anthropic defies the odds, holding record IPO despite ‘massively disruptive’ market
Forget Anthropic: In Europe, the IPO hype is about a blue lagoon