fetch() public method

Shortcut for query()->fetch()
public fetch ( $sql, $params ) : Nette\Database\Row
return Nette\Database\Row
示例#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);
     }
 }
示例#2
0
 public function getItemByLinkChannel($link, $channel_id)
 {
     return $this->database->fetch("select *" . " from rss_items" . " where link=?" . " and rss_channel_id=?;", $link, $channel_id);
 }
示例#3
0
 public function get($id)
 {
     return $this->database->fetch("SELECT * FROM upload WHERE id = ?;", $id);
 }
示例#4
0
 public function getHodnoceniByIp($id, $ip)
 {
     return $this->database->fetch("SELECT * FROM hodnoceni WHERE clanek_id=? and ip=?;", $id, $ip);
 }
示例#5
0
 public function getByUrl($url)
 {
     return $this->database->fetch("SELECT * FROM kategorie WHERE url=?;", $url);
 }