Answered: new variable create?

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

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:
Why a niche category of CRE lending is suddenly seeing record deals
Jim Cramer says he's not abandoning the Mag 7 stocks despite recent struggles. Here's why
Advisors to the ultra rich say AI isn't a gamechanger for landing new clients
Capital One is buying startup Brex for $5.15 billion in credit card firm's latest deal
Adani group stocks plunge as U.S. SEC looks to question founder over fraud charges
House passes final funding bills 8 days before shutdown, Senate now will consider
As federal ACA subsidies lapse, blue states offer their own
S&P 500 and Nasdaq rise led by tech, Dow struggles as Street wraps up wild week: Live updates
What I want from Apple, Meta and Microsoft in their key earnings reports
JPMorgan's top short ideas for 2026