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; }
/** * @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); } }