medoo::has PHP Method

has() public method

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

Beispiel #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