Home > CMS Tutorial > Empire CMS > body text

Notes on SQL calls of Sharing Empire CMS7.0 universal tags

silencement
Release: 2019-11-28 13:56:49
forward
1778 people have browsed it

Notes on SQL calls of Sharing Empire CMS7.0 universal tags

Empire CMS universal tag SQL statement calling is more flexible and is a calling method preferred by many webmasters who use Imperial CMS. However, Imperial CMS version 7.0 is different from the previous 6.6 version. There are some differences due to the adjustment of the data table structure.

Take the database phome_ecms_news that comes with the Empire CMS6.6 version as an example. Its foreign news classid is 35. The following method can be used to call the latest 5 pieces of data:

The code is as follows:

[ecmsinfo]'select * from [!db.pre!]ecms_news where checked=1 and classid=35 order by newstime desc 
limit 5 ' ,5,24,0,24,2,0[/ecmsinfo]
Copy after login

Push to learn "Empire cms tutorial"

By analogy, the following statement can be used to call the latest 6th to 10th data:

The code is as follows:

[ecmsinfo]'select * from [!db.pre!]ecms_news where checked=1 and classid=35 order by newstime desc
 limit 5,5 ' ,5,24,0,24,2,0[/ecmsinfo]
Copy after login

But if the Empire CMS7.0 version is used, the above statement will go wrong! The reason is that Imperial CMS7.0 separates unaudited information, so the checked field is missing from the table. At this time, the following statement can be used to call the latest 5 information:

The code is as follows:

[ecmsinfo]'select * from [!db.pre!]ecms_news where and classid=35 order by newstime desc limit 5 ' ,
5,24,0,24,2,0[/ecmsinfo]
Copy after login

The above is the detailed content of Notes on SQL calls of Sharing Empire CMS7.0 universal tags. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:www.word666.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!