in reply to Database Update or Insert

Also mysql will return count as '0E0', so you check (!'0E0') will be always false.

it should looks like  unless ($sth->execute()+0) {....

Replies are listed 'Best First'.
Re: Re: Database Update or Insert
by Mr. Muskrat (Canon) on Apr 29, 2002 at 17:33 UTC
    Perhaps someone should tell Jochen Wiedmann, Alligator Descartes, Gary Shea, Andreas Konig, and Tim Bunce. ;) Why? I got the original error checking code straight from the DBD::mysql pod. I was reading through it again this weekend and said "Hey! That's where I got it from!" :)
    And yes, I do talk to myself. And it's perfectly normal. Just ask my shrink. :D

    Matthew Musgrove
    Who says that programmers can't work in the Marketing Department?
    Or is that who says that Marketing people can't program?
      Pardon the newbie question - is there a DBD::Oracle pod, and if so, where might I find some example code for it...

        Yes, there is. You can install it with PPM if you have it, or find it on CPAN.
        Then read the pod. It has examples, as do *most* modules.
        Want more? Google for it.

        Words of advice:

        1. Use the Super Search
        2. Use CPAN
        3. Use Google (or your favorite search engine for that matter)
        4. Use your brain
        Not necessarily in that order...

        Matthew Musgrove
        Who says that programmers can't work in the Marketing Department?
        Or is that who says that Marketing people can't program?