Re: New Problem w/PostgreSQL

[prev] [thread] [next] [Date index for 2005/02/09]

From: Justin Tocci
Subject: Re: New Problem w/PostgreSQL
Date: 05:10 on 09 Feb 2005
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
>

New Problem w/PostgreSQL
Justin Tocci 02:36 on 09 Feb 2005

Re: New Problem w/PostgreSQL
Perrin Harkins 03:30 on 09 Feb 2005

Re: New Problem w/PostgreSQL
Justin Tocci 05:10 on 09 Feb 2005

Re: New Problem w/PostgreSQL
Perrin Harkins 05:24 on 09 Feb 2005

Re: New Problem w/PostgreSQL
Justin Tocci 05:34 on 09 Feb 2005

Generated at 17:31 on 15 Feb 2005 by mariachi v0.52