Home  >  Article  >  CMS Tutorial  >  Notes on SQL calls of Sharing Empire CMS7.0 universal tags

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

silencement
silencementforward
2019-11-28 13:56:491786browse

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]

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]

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]

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!

Statement:
This article is reproduced at:www.word666.com. If there is any infringement, please contact admin@php.cn delete