Cheetah
ChWsbSiteMapsQuery.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbDb');
9 
14 {
15  protected $_aSystem;
16 
17  public function __construct ($aSystem)
18  {
19  parent::__construct();
20  $this->_aSystem = $aSystem;
21  }
22 
23  static public function getAllActiveSystemsFromCache ()
24  {
25  return $GLOBALS['MySQL']->fromCache('sys_objects_site_maps', 'getAllWithKey', 'SELECT * FROM `sys_objects_site_maps` WHERE `active` = 1 ORDER BY `order`', 'object');
26  }
27 
28  public function getCount ($aQueryParts)
29  {
30  $sQuery = 'SELECT COUNT(*) FROM ' . $aQueryParts['table'] . ' ' . $aQueryParts['join'] . ' ' . ' WHERE 1 ' . $aQueryParts['where'];
31  return $this->getOne($sQuery);
32  }
33 
34  public function getRecords ($aQueryParts, $iStart, $iLimit = 25000)
35  {
36  $sQuery = 'SELECT ' . $aQueryParts['fields'] .
37  ' FROM ' . $aQueryParts['table'] . ' ' . $aQueryParts['join'] . ' ' .
38  ' WHERE 1 ' . $aQueryParts['where'] . ' ' .
39  ($aQueryParts['order'] ? ' ORDER BY ' . $aQueryParts['order'] : '') . ' ' .
40  'LIMIT ' . $iStart . ',' . $iLimit;
41  return $this->getAll($sQuery);
42  }
43 }
ChWsbSiteMapsQuery\__construct
__construct($aSystem)
Definition: ChWsbSiteMapsQuery.php:17
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
ChWsbSiteMapsQuery\getCount
getCount($aQueryParts)
Definition: ChWsbSiteMapsQuery.php:28
php
ChWsbDb\getAll
getAll($sQuery, $aBindings=[], $iFetchType=PDO::FETCH_ASSOC)
Definition: ChWsbDb.php:206
ChWsbSiteMapsQuery\getRecords
getRecords($aQueryParts, $iStart, $iLimit=25000)
Definition: ChWsbSiteMapsQuery.php:34
ChWsbDb\getOne
getOne($sQuery, $aBindings=[], $iIndex=0)
Definition: ChWsbDb.php:263
ChWsbSiteMapsQuery\getAllActiveSystemsFromCache
static getAllActiveSystemsFromCache()
Definition: ChWsbSiteMapsQuery.php:23
ChWsbSiteMapsQuery
Definition: ChWsbSiteMapsQuery.php:14
ChWsbSiteMapsQuery\$_aSystem
$_aSystem
Definition: ChWsbSiteMapsQuery.php:15
ChWsbDb
Definition: ChWsbDb.php:13
$GLOBALS
$GLOBALS['iAdminPage']
Definition: advanced_settings.php:10