Method of Displaying Supply Enterprise and Information Number on Home Page by destoon

  • 2021-07-09 07:25:34
  • OfStack

destoon to achieve home display supply, enterprise, the number of information has a variety of methods, introduced here is directly call php program code query. destoon template inside is to support php code, so we can directly query in the template can be.

The implementation code is as follows:


<ul>
  {php $sellcount=$db->get_one("SELECT COUNT(*) AS num FROM ".$DT_PRE."sell WHERE status=3");} 
   <li> Shared {$sellcount[num]} Strip supply </li>
 {php $company=$db->get_one("SELECT COUNT(*) AS num FROM ".$DT_PRE."member WHERE groupid>5");}
   <li> Shared {$company[num]} Enterprise </li>
 {php $newcount=$db->get_one("SELECT COUNT(*) AS num FROM ".$DT_PRE."article_21 WHERE status=3");}
   <li> Shared {$newcount[num]} Items of information </li>
</ul>

Page displays the current date:


{date('Y-m-d',$DT_TIME)}

Related articles: