Re: multiple database updates from 1 form
From: Eric Bohlman (ebohlman_at_earthlink.net)
Date: 02/26/04
- Next message: Chung Leong: "Re: php form textarea saving to file: ^M problem"
- Previous message: Snah: "Re: probably stupid problem"
- In reply to: David Mackenzie: "Re: multiple database updates from 1 form"
- Next in thread: Comcast: "Re: multiple database updates from 1 form"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Feb 2004 23:28:23 GMT
David Mackenzie <me@privacy.net> wrote in
news:2fso30pk56h5b9h82pqptbg7t8h5m76emu@4ax.com:
> On Wed, 25 Feb 2004 04:17:51 GMT, "Comcast" <ewvea3dgc7001 .@.
> sneakemail.com> wrote:
>
>>This solution is working fine, but I hate the idea that I'm updating
>>data that isn't changing. I've considered keeping state when a form is
>>shown, then comparing the values between the original state, and if
>>its different then update the database.
>
> You needn't worry about things like that. The database is capable of
> optimising itself.
>
> From:
> http://www.mysql.com/documentation/mysql/bychapter/manual_SQL_Syntax.ht
> ml#UPDATE
>
> "If you set a column to the value it currently has, MySQL notices this
> and doesn't update it."
>
> I'm sure other RDBMSs have similar optimisations.
Sometimes, though, you want to keep track of when an item was last
modified, and in that case updating everything at once will destroy that
ability.
- Next message: Chung Leong: "Re: php form textarea saving to file: ^M problem"
- Previous message: Snah: "Re: probably stupid problem"
- In reply to: David Mackenzie: "Re: multiple database updates from 1 form"
- Next in thread: Comcast: "Re: multiple database updates from 1 form"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|