The example in this article describes the SQL calling method of the Empire CMS custom list. Share it with everyone for your reference. The specific methods are as follows:
Empire CMS custom lists can be used to implement specific information lists.
How to use custom lists:
Users enter the background->Template Management->Custom List->(upper right corner) to add a custom list
1 . The list name is the name of the list seen by the backend administrator.
2. The title name is the title, which can be displayed in the template using the global tag [!--pagetitle--], so that multiple custom lists can share the same list template
3 . The file storage directory is the storage directory, and the storage directory supports '_', '-' and other symbols
4. The file extension is the extension, and it is recommended to use html
5. Statistical records: ( For example: select count(*) as total from phome_ecms_news where classid=1 and checked=1)
Note: This SQL sentence means to find the statistics located in the data table phome_ecms_news column id=1 and review of the news data table Total number of information passed
6. Query records: (for example: select * from phome_ecms_news where classid=1 and checked=1 order by id)
Note: This SQL sentence means to query * (This symbol represents all field information) From phome_ecms_news, the data table conditions are column ID=1 and review=1 (which means review passed) by id, which is to sort according to the ID of the information. (If you add a desc in reverse order, for example: by id desc)
Recommended to study "Empire cms tutorial"
Commonly used empire CMS custom list syntax:
1. SQL statement 1:
The code is as follows:
select count(*) as total from [!db.pre!]ecms_news where classid in (3,18,32,44,71)
Note: The column ID under the query news data table is: 3, 18, 32, 44, 71 The total number of information
2. SQL statement 2:
The code is as follows:
select * from [!db.pre!]ecms_news where classid in (3,18,32,44,71) order by id desc
Note: The column ID under the news data table is called: 3, 18, 32, 44, 71 information
3. SQL statement 3:
The code is as follows:
select * from [!db.pre!]_ecms_news where classid=59 and checked=1 order by id
Note: Call the information whose column ID is 59 under the news data table and has passed the review.
The above is the detailed content of Empire CMS custom list SQL calling method. For more information, please follow other related articles on the PHP Chinese website!