Answered: new variable create?

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

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:
Analysis: Chairman Kevin Warsh’s task forces are the key to understanding the new Fed
Can you get a loan for a wedding? The do's, don'ts and alternatives
Jim Cramer says this chipmaker is still a buy after soaring more than 200% this year
auto shop keeps postponing major repair
Stock futures rise as Fed hints at possible rate hike in 2026; Kospi hits over 9,000 for the first time: Live updates
People with high sleep needs?
India’s largest stock exchange files for IPO as mega-listings gather pace
CEOs of Anthropic and Google DeepMind call for U.S.-led AI coalition in meeting at G7
China to return as major oil buyer in August, JPMorgan says, naming its top stock picks
How Elon Musk's second-in-command Gwynne Shotwell helped turn SpaceX into an IPO giant