Answered: new variable create?

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

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:
Trump doubles down on Rob Reiner criticism after killing; director's son in custody
Baron Capital rolls out five active ETFs, SpaceX becomes the firm's biggest investment
LinkedIn CEO: Ignore this common piece of career advice—it's 'outdated' and 'a little bit foolish'
U.S. halts UK tech trade deal negotiations, FT reports
Payrolls rose by 64,000 in November after falling by 105,000 in October, delayed jobs numbers show
Trump sues BBC for $10 billion, claims defamation from Panorama documentary
Ford to record $19.5 billion in special charges related to EV pullback
Databricks raises capital at $134 billion valuation in latest funding round
This cybersecurity stock is emerging as an AI play. How to play it with options heading into the new year
Robotaxis in 2025: Waymo plots global expansion as Zoox, Tesla roll to the starting line