public function record_exists_select($table, $select, array $params=null) {
        if ($select) {
            $select = "WHERE $select";
        }
        return $this->record_exists_sql("SELECT 'x' FROM {" . $table . "} $select", $params);
    }
public function record_exists_select($table, $select, array $params=null) {
        if ($select) {
            $select = "WHERE $select";
        }
        return $this->record_exists_sql("SELECT 'x' FROM {" . $table . "} $select", $params);
    }
public function record_exists_select ( $ table , $ select , array $ params = null ) { if ( $ select ) { $ select = "WHERE $select" ; } return $ this -> record_exists_sql ( "SELECT 'x' FROM {" . $ table . "} $select" , $ params ) ; }
Test whether any records exists in a table which match a particular WHERE clause.

@param string $table The database table to be checked against.
@param string $select A fragment of SQL to be used in a WHERE clause in the SQL call.
@param array $params array of sql parameters
@return bool true if a matching record exists, else false.
@throws dml_exception A DML specific exception is thrown for any errors.
Test whether any records exists in a table which match a particular WHERE clause .