Esempio n. 1
0
 /**
  * Returns $numItems rows starting from the $startIndex row from the 
  * table.
  *
  * Add authorization or any logical checks for secure access to your data 
  *
  * 
  * 
  * @return array
  */
 public function getItem_paged($lang = 'cn', $startIndex, $numItems, $typeId, $club = null)
 {
     if (is_string($lang)) {
         $condition['lang'] = $lang;
     }
     if ($typeId) {
         $condition['typeId'] = $typeId;
     }
     $condition['club'] = $club;
     //	var_dump($club);
     $param = array('condition' => $condition, 'order' => 'id desc', 'limit' => $numItems, 'offset' => $startIndex);
     $result = tdb::select(self::$tablename, $param);
     return $result;
 }