public function haveInDatabase($table, array $data)
    {
        $lastInsertId = $this->_insertInDatabase($table, $data);

        $this->addInsertedRow($table, $data, $lastInsertId);

        return $lastInsertId;
    }
public function haveInDatabase($table, array $data)
    {
        $lastInsertId = $this->_insertInDatabase($table, $data);

        $this->addInsertedRow($table, $data, $lastInsertId);

        return $lastInsertId;
    }
public function haveInDatabase ( $ table , array $ data ) { $ lastInsertId = $ this -> _insertInDatabase ( $ table , $ data ) ; $ this -> addInsertedRow ( $ table , $ data , $ lastInsertId ) ; return $ lastInsertId ; }
Inserts an SQL record into a database. This record will be erased after the test.

```php
<?php
$I->haveInDatabase('users', array('name' => 'miles', 'email' => 'miles@davis.com'));
?>
```

@param string $table
@param array $data

@return integer $id
Inserts an SQL record into a database . This record will be erased after the test .