----- Original Message -----
From: "Paul DuBois" <[EMAIL PROTECTED]>
To: "rory oconnor" <[EMAIL PROTECTED]>
Cc: "Rune Steinseth" <[EMAIL PROTECTED]>; "mysql list (choose midget)"
<[EMAIL PROTECTED]>
Sent: Tuesday, May 14, 2002 11:45 AM
Subject: Re: Making UPDATE return the no. of rows matched [from Perl]

[snip]

>On Thu, 2002-03-14 at 09:51, Paul DuBois wrote:
>>  At 10:41 +0100 3/14/02, Rune Steinseth wrote:
>>  >Hi all,
>>  >I have changed database for my Java app to MySQL.  The
>>  >app was developed with SQL Server.  Some of the logic
>>  >is dependent on getting the no. of rows updated
>>  >returned after an UPDATE query.  MySQL does only
>>  >return the rows that are really updated, not the rows
>>  >matched of an UPDATE.  This causes problems.
>>  >Is there an easy way to get MySQL always return the
>>  >number of rows matched in an UPDATE?
>>
>>  There's a flag you can set to control this when connecting to the
>>  MySQL server, if you're using the C API or the Perl DBI API.  I
>>  don't think there's an option for this in Java, at least if you're
>  > using the MM.MySQL driver.  It seems to set the CLIENT_FOUND_ROWS
>>  flag unconditionally.  I guess you could change the source and
>>  recompile.

Later versions of the JDBC driver (2.0.13 is the latest, but this change was
made quite some time ago) use the CLIENT_FOUND_ROWS flag, as it's the
behavior that JDBC-based apps expect.

    -Mark


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to