SPUG: Using a Duplicate Value Error Message
Will Kidwell
will at marketproductions.com
Wed Mar 21 01:52:50 PDT 2007
Greetings Everyone,
I'd like to thank everyone for the helpful replies and the warm welcomes. :)
I havent fully had a chance to fully review the responses or finish the
script, but I dont think it will be terribly hard now either.
And to those who had asked - yes, I do have the handles column set to
"unique". Forgot to mention that in my initial email.
Seems like a great list you have going here. Glad to be a part of it.
Thanks again,
:)
Will
----- Original Message -----
From: "Fred Morris" <m3047 at inwa.net>
To: "Colin Meyer" <cmeyer at helvella.org>
Cc: <spug-list at pm.org>
Sent: Tuesday, March 20, 2007 9:17 PM
Subject: Re: SPUG: Using a Duplicate Value Error Message
> Golly you're right:
>
> my $rv = $sth->execute();
> $an_error = (! $rv);
>
> Of course, reading the documentation would make all this clear.
>
> On Tuesday 20 March 2007 10:20, Colin Meyer wrote:
>> On Tue, Mar 20, 2007 at 08:53:10AM -0700, Fred Morris wrote:
>> > Hello Will, welcome to the list!
>> >
>> > Without critiquing style (doesn't this come down to style?), isn't the
>> > answer obviously that what you'd normally do at that point in the code
>> > is
>> > display whatever congratulations page you're planning to send to the
>> > user
>> > for registering? You have to send something to the user as a success
>> > page
>> > if they are successful.
>> >
>> > FIRST: You have to test $sth for success, that is to say
>> > $an_error = (! $sth);
>>
>> Note that $sth will have a false value only if $dbh->prepare( $sql )
>> failed. If $sth was created successfully, but an error occurred during
>> $sth->execute(), then $sth will still hold a true value (which is the
>> statement handle object).
>
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
> POST TO: spug-list at pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
> MEETINGS: 3rd Tuesdays
> WEB PAGE: http://seattleperl.org/
More information about the spug-list
mailing list