Re: update query returns wrong number of rows affected

Rudy Lippan <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
On Wed, 15 Sep 2004, Dave Dyer wrote:

> For some UPDATE queries (possibly those involving joins?), the number of
> rows reported for the query is the number of rows processed, rather than the
> number of rows actually changed.
> 
> This shows the results from a command prompt:
> 
> mysql> UPDATE jobpage LEFT JOIN dbin.pagedata as plant
>     ->    ON pagenum=page_numberid AND job_numberid='7' and job_yearid='2004'
>     ->    SET  jobpage.date_received=plant.date_received
>     ->    WHERE number='7-2004'
>     -> ;
> Query OK, 0 rows affected (5.14 sec)
> Rows matched: 224  Changed: 0  Warnings: 0
> 
> Using dbd-mysql, the result returned is 224 rather than 0

That is correct. 

Rudy



-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.