in reply to DBI UPDATE statement failing

Could the problem be to do with rows() ?

From http://search.cpan.org/doc/TIMB/DBI-1.20/DBI.pm: Generally, you can only rely on a row count after a non-SELECT execute (for some specific operations like UPDATE and DELETE), or after fetching all the rows of a SELECT statement.

Maybe you should SELECT COUNT etc instead.

andy.

Replies are listed 'Best First'.
Re: Re: DBI UPDATE statement failing
by Merlin83 (Novice) on Dec 14, 2001 at 22:27 UTC
    The rows check is only so sites that aren't in the remote database don't mess up the script. The fact that it says what it's going to do correctly with the print statement says to me that the problem lies elsewhere.
      You're right, of course.

      But aren't these parameters the wrong way round?

      $sthUpdateBandwidth->execute($data[0], $newbw)

      andy.

        Excellent, thank you :-) I apologise for bothering the monks with such (eventually) a simple little problem. Thanks again.