Re: mysql_affected_rows inaccurate?

From: Date: Fri, 16 Feb 2007 01:12:41 +0000
Subject: Re: mysql_affected_rows inaccurate?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-248940@lists.php.net to get a copy of this message
On Thu, February 15, 2007 10:06 am, altendew wrote: > > Hi a long time ago I stopped using mysql_affected_rows because I > believed it > was giving me an inaccurate number. Now I was not very knowledged then > so it > could of been my own fault. Is this function safe and functional? > Could it > possibly give me the row result of a previous query I did and not the > latest? Works for me. It only counts rows that ACTUALLY CHANGED and not the number of rows that fit your WHERE clause. This can be confusing at first, but is quite useful, particularly for marking records "dirty" when you want to re-publish a record only if it really really changed in a large database -> static publishing setup. http://php.net/mysql_affected_rows -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#248940) next »