Nette\Database\Context::fetch PHP 메소드

fetch() 공개 메소드

Shortcut for query()->fetch()
public fetch ( $sql, $params ) : Nette\Database\Row
리턴 Nette\Database\Row
    public function fetch($sql, ...$params)
    {
        return $this->connection->query($sql, ...$params)->fetch();
    }

Usage Example

예제 #1
0
 public function get($identity)
 {
     if (\is_numeric($identity)) {
         return $this->database->fetch("SELECT * FROM " . self::TABLE_NAME . " WHERE " . self::COLUMN_ID . "=?;", $identity);
     } else {
         return $this->database->fetch("SELECT * FROM " . self::TABLE_NAME . " WHERE " . self::COLUMN_IDENTITY . "=?;", $identity);
     }
 }
All Usage Examples Of Nette\Database\Context::fetch