fetch() 공개 메소드

Shortcut for query()->fetch()
public fetch ( $sql, $params ) : Nette\Database\Row
리턴 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);
 }