Пример #1
0
 public function readDatabase($where = null, $params = null)
 {
     if ($where == null) {
         if (!Tool::isEmpty(self::getId())) {
             $where = "where id =" . self::getId();
         }
     }
     $this->setSQL('select * from tbuser ' . $where);
     $result = $this->excuteRead($params);
     $this->prepare($result);
     return $result;
 }
Пример #2
0
 public function readDatabaseByUser()
 {
     if (!Tool::isEmpty($this->getrefUser())) {
         $where = " where refuser = " . $this->getrefUser();
     } else {
         return;
     }
     $this->setSQL('select * from ' . self::TABLENAME . $where);
     $result = $this->excuteRead();
     $this->prepare($result);
     //return $result;
 }