medoo::has PHP 메소드

has() 공개 메소드

public has ( $table, $join, $where = null )
    public function has($table, $join, $where = null)
    {
        $column = null;
        $query = $this->query('SELECT EXISTS(' . $this->select_context($table, $join, $column, $where, 1) . ')');
        return $query ? $query->fetchColumn() === '1' : false;
    }

Usage Example

예제 #1
0
 /**
  * @param $table
  * @param $where
  * @return bool
  */
 public function has($table, $where)
 {
     if (empty($this->_reader)) {
         return $this->_writer->has($table, $where);
     } else {
         return $this->_reader->has($table, $where);
     }
 }
All Usage Examples Of medoo::has