fetch() public method

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