in reply to Re: Number of rows affected by an update command
in thread Number of rows affected by an update command

Thanks for your reply. How would you spot a failed update then?
  • Comment on Re^2: Number of rows affected by an update command

Replies are listed 'Best First'.
Re^3: Number of rows affected by an update command
by Tux (Canon) on Nov 04, 2010 at 07:36 UTC

    Define "failed". If an update affects no records at all (the where clause doesn't match any records), is it a FAIL or is it a PASS? For me it is a PASS. A FAIL is when the database returns an error.

    Personally I ALWAYS use the RaiseError database handle attribute, and enclose code that expectedly can fail inside an eval { }.


    Enjoy, Have FUN! H.Merijn