For php, mysql extracts and saves data from a database to a php file. for example
For the forum, there should be two basic values for each forum table
1. fid
2. name
However, if there are too many people, I don't want to view the fid every time I see it.
Can it be made after this table is changed or after an action is performed?
It will be queried from the database once, and then saved to a php file (as cache), saved as an array
Every time a user browses, fid is pre-configured in the template to find the cached php file and relevant information in the array.
How can this be done?
Reply to discussion (solution)
The program file is a file, and the table is also a file
All of them are in the file. why do I have to do it multiple times?
If not? But directly? Query the result ??? Faster than querying files.
If the memory is large enough, it can be stored in the memory.
Cache with memcache
Without memcache, I only use SMARTY
Do you think it is faster to directly use mysql?
If the forum cannot be changed once a year, I directly create an array and put it in the configuration file. this is better than Querying SQL
Which one is relatively low?