List:General Discussion« Previous MessageNext Message »
From:Vivek Khera Date:May 25 1999 7:01pm
Subject:Re: Drivers giving different results
View as plain text  
>>>>> "JW" == Jochen Wiedmann <joe@stripped> writes:

JW> I am now asked to change the DBD::mysql driver not to return the result
JW> of mysql_affected_rows(), but read mysql_info() and parse the output to
JW> return the matched rows. This is something I definitely don't like,
JW> because it is slow and unsafe.

JW> My question is whether you can either

JW>   - supply the same info via a new function, mysql_matched_rows(), say or

This would be ok, but the DBI interface should expose this function,
not change the meaning of affected rows.

JW>   - change mysql_affected_rows to return the number of matched rows

No.  This would be bad.  I think that the "affected" rows has a valid
meaning in this case, and should not be changed.  An SQL server is
well within its rights to rewrite such a query by not affecting rows
that are already set to the "new" value.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@stripped       Rockville, MD       +1-301-545-6996
PGP & MIME spoken here            http://www.kciLink.com/home/khera/
Thread
Re: Drivers giving different resultsJochen Wiedmann26 May