public function seeInDatabase( $table, $criteria = array() ) {
		$query = $this->_prepareQuery( $table, 'count(*)', $criteria );
		$this->debugSection( 'Query', $query );

		$suppress_errors = $this->_wpdb->suppress_errors( true );
		$res = $this->_wpdb->get_var( $query );
		$this->_wpdb->suppress_errors( $suppress_errors );

		if ( ! empty( $this->_wpdb->last_error ) ) {
			$this->fail( 'Database error: ' . $this->_wpdb->last_error );
			return;
		}

		$this->assertGreaterThan( 0, $res, 'No matching records found' );
	}
public function seeInDatabase( $table, $criteria = array() ) {
		$query = $this->_prepareQuery( $table, 'count(*)', $criteria );
		$this->debugSection( 'Query', $query );

		$suppress_errors = $this->_wpdb->suppress_errors( true );
		$res = $this->_wpdb->get_var( $query );
		$this->_wpdb->suppress_errors( $suppress_errors );

		if ( ! empty( $this->_wpdb->last_error ) ) {
			$this->fail( 'Database error: ' . $this->_wpdb->last_error );
			return;
		}

		$this->assertGreaterThan( 0, $res, 'No matching records found' );
	}
public function seeInDatabase ( $ table , $ criteria = array ( ) ) { $ query = $ this -> _prepareQuery ( $ table , 'count(*)' , $ criteria ) ; $ this -> debugSection ( 'Query' , $ query ) ; $ suppress_errors = $ this -> _wpdb -> suppress_errors ( true ) ; $ res = $ this -> _wpdb -> get_var ( $ query ) ; $ this -> _wpdb -> suppress_errors ( $ suppress_errors ) ; if ( ! empty ( $ this -> _wpdb -> last_error ) ) { $ this -> fail ( 'Database error: ' . $ this -> _wpdb -> last_error ) ; return ; } $ this -> assertGreaterThan ( 0 , $ res , 'No matching records found' ) ; }
Checks whether or not a record exists in the database.

@since 1.0.0

@access public
@param string $table The table name.
@param array $criteria The array of conditions.
Checks whether or not a record exists in the database .