Answered: new variable create?

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

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:
Ken Griffin’s flagship hedge fund at Citadel rises 10.2% in volatile 2025
Buffett backs new CEO Greg Abel with 'huge endorsement' in CNBC interview
Be careful buying the top 10 ETFs of 2025: They have 'very little, if any' role in your portfolio, says expert
Behind the mesh curtain: Why airline class wars will intensify in 2026
Bank of America expects a boost in dividends in 2026. These stocks have payouts that beat the market
U.S. indictment against Venezuela President Maduro, wife is unsealed
Fed's Kashkari says AI is causing a hiring slowdown in big companies
Protest over AI, climate crisis leaves tens of thousands without power in Berlin
Amazon lets some users chat with Alexa+ on the web in bid to take on ChatGPT
Maduro overthrow could pave the way for these U.S. oil companies to recover assets seized by Venezuela