Re: New Problem w/PostgreSQL
[prev]
[thread]
[next]
[Date index for 2005/02/09]
Thank you Perrin, that did it.
I just want to post this because the documentation I'm using omits the
need for ->first. Maybe it'll save someone some time.
Delete from search with Class::DBI and Postgres.
#!/usr/bin/perl -wT
use strict;
use My::Xuser;
my $class = "My::Xuser";
my $it = $class->search(login_name =>"testing");
my $pk = $it->first;
$pk->delete;
$class->dbi_commit;
Class DBI is cool.
justin tocci
fort wayne, in
On Feb 8, 2005, at 10:30 PM, Perrin Harkins wrote:
> Justin Tocci wrote:
>> use strict;
>> use My::Xuser;
>> my $class = "My::Xuser";
>> #DBI->trace( 1 );
>> $class->search(login_name => "testing")->delete_all();
>> ----------------
>> I lifted the code on line, it seems hard to mess up since it is so
>> short. I get no error from the command line but i check the database
>> and the record is still there.
>
> Did you call dbi_commit() somewhere?
>
> - Perrin
>