![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.php archiveRe: Interesting problem
From: Andy Hassall <andy@andyh.co.uk>
Date: Wed Mar 01 2006 - 21:34:00 CET
On Wed, 01 Mar 2006 15:02:41 -0500, ward@ wrote:
>On 1 Mar 2006 11:33:23 -0800, "frizzle" <phpfrizzle@gmail.com> wrote:
MySQL already checks if the updated values match the existing values, and you
mysql> insert into t values (1, 'test');
mysql> update t set c = 'test' where id = 1;
mysql> update t set c = 'not test' where id = 1;
It's the "Changed:" count that makes it out to PHP.
Don't start doing it yourself by selecting and checking, as you just introduce
Do check for an actual error through, as in mysql_query() returning false;
-- Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis toolReceived on Mon May 1 02:25:06 2006 |