Esempio n. 1
0
 private function getMain($lib)
 {
     $format = "SELECT lib FROM `" . DB_PRE_CORE . "roles`  where types=%d and id = (select pid from " . DB_PRE_CORE . "roles where types=%d and lib='%s' limit 1) limit 1";
     $sql = sprintf($format, DB_TYPE_DIFFERENCE, DB_TYPE_DIFFERENCE, $lib);
     $m = parent::FetchOne($sql);
     return $m['lib'];
 }