src/Tao/Database/Model.php
public function has($primaryKey, $column = null)
    {
        if (null === $column) {
            $column = $this->getPrimaryKey();
        }

        return (boolean)$this->app['db']->fetchColumn(
            'SELECT COUNT(:column) FROM ' . $this->getTable() . ' WHERE '.$this->getPrimaryKey().' = :pk',
            [
                'column' => $column,
                'pk' => $primaryKey
            ]
        );
    }
public function has($primaryKey, $column = null)
    {
        if (null === $column) {
            $column = $this->getPrimaryKey();
        }

        return (boolean)$this->app['db']->fetchColumn(
            'SELECT COUNT(:column) FROM ' . $this->getTable() . ' WHERE '.$this->getPrimaryKey().' = :pk',
            [
                'column' => $column,
                'pk' => $primaryKey
            ]
        );
    }
public function has ( $ primaryKey , $ column = null ) { if ( null === $ column ) { $ column = $ this -> getPrimaryKey ( ) ; } return ( boolean ) $ this -> app [ 'db' ] -> fetchColumn ( 'SELECT COUNT(:column) FROM ' . $ this -> getTable ( ) . ' WHERE ' . $ this -> getPrimaryKey ( ) . ' = :pk' , [ 'column' => $ column , 'pk' => $ primaryKey ] ) ; }
Indicate if a given entry exists.

@param mixed $primaryKey
@param string $column
@return boolean
Indicate if a given entry exists .