diff options
| author | fukachan <fukachan> | 2001-03-18 11:39:59 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-03-18 11:39:59 +0000 |
| commit | b8b559c6e59db55617c2ec48861030f761e8c29e (patch) | |
| tree | 371e00375d37113cf30a1bb96debf67935111212 /fml/lib/IO | |
| parent | 8bed8a63a670468e298323bb007d80c87a125cd1 (diff) | |
| download | fml8-b8b559c6e59db55617c2ec48861030f761e8c29e.tar.gz fml8-b8b559c6e59db55617c2ec48861030f761e8c29e.tar.bz2 fml8-b8b559c6e59db55617c2ec48861030f761e8c29e.zip | |
fix close() bug
define add( $addr ) and delete( $addr ) method
Diffstat (limited to 'fml/lib/IO')
| -rw-r--r-- | fml/lib/IO/Adapter/MySQL.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fml/lib/IO/Adapter/MySQL.pm b/fml/lib/IO/Adapter/MySQL.pm index 8614f35b..8eb1859b 100644 --- a/fml/lib/IO/Adapter/MySQL.pm +++ b/fml/lib/IO/Adapter/MySQL.pm @@ -117,6 +117,8 @@ sub close $res->finish if defined $res; $dbh->disconnect if defined $dbh; + delete $self->{ _res }; + delete $self->{ _dbh }; } @@ -256,4 +258,26 @@ sub error } +=head2 C<add()> + +=cut + +sub add +{ + my ($self, $args) = @_; + my $query = $self->_schema_configure('add'); + $query = sprintf($query, $args); + $self->execute({ query => $query }); +} + + +sub delete +{ + my ($self, $args) = @_; + my $query = $self->_schema_configure('delete'); + $query = sprintf($query, $args); + $self->execute({ query => $query }); +} + + 1; |
