tune has asked for the wisdom of the Perl Monks concerning the following question:
I had some working with DBI, where I wanted to know how many rows the statement deleted.
I needed to use LIMIT, because the table is huge, and running the statement without limit, would lock the table up for several minutes, which would cause me looking for a new job and a lot of money loss for my company :-)my $nr = $dbh->do("DELETE FROM table WHERE date<'2001-10-01' LIMIT 150 +0") or die $dbh->errstr;
Could anybody explain it to me? Thanks.
--
tune
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI-do return value
by AidanLee (Chaplain) on Nov 29, 2001 at 03:21 UTC | |
|
Re: DBI-do return value
by mpeppler (Vicar) on Nov 29, 2001 at 03:39 UTC | |
by hakkr (Chaplain) on Nov 29, 2001 at 17:56 UTC | |
by mpeppler (Vicar) on Nov 29, 2001 at 22:22 UTC | |
by barndoor (Pilgrim) on Nov 29, 2001 at 20:01 UTC | |
|
Re: DBI-do return value
by runrig (Abbot) on Nov 29, 2001 at 03:28 UTC |