protected function _newId( MW_DB_Connection_Interface $conn, $sql )
	{
		$result = $conn->create( $sql )->execute();

		if( ( $row = $result->fetch( MW_DB_Result_Abstract::FETCH_NUM ) ) === false ) {
			throw new MShop_Exception( sprintf( 'ID of last inserted database record not available' ) );
		}
		$result->finish();

		return $row[0];
	}
protected function _newId( MW_DB_Connection_Interface $conn, $sql )
	{
		$result = $conn->create( $sql )->execute();

		if( ( $row = $result->fetch( MW_DB_Result_Abstract::FETCH_NUM ) ) === false ) {
			throw new MShop_Exception( sprintf( 'ID of last inserted database record not available' ) );
		}
		$result->finish();

		return $row[0];
	}
protected function _newId ( MW_DB_Connection_Interface $ conn , $ sql ) { $ result = $ conn -> create ( $ sql ) -> execute ( ) ; if ( ( $ row = $ result -> fetch ( MW_DB_Result_Abstract :: FETCH_NUM ) ) === false ) { throw new MShop_Exception ( sprintf ( 'ID of last inserted database record not available' ) ) ; } $ result -> finish ( ) ; return $ row [ 0 ] ; }
Returns the newly created ID for the last record which was inserted.

@param MW_DB_Connection_Interface $conn Database connection used to insert the new record
@param string $sql SQL statement for retrieving the new ID of the last record which was inserted
@return string ID of the last record that was inserted by using the given connection
@throws MShop_Common_Exception if there's no ID of the last record available
Returns the newly created ID for the last record which was inserted .