|
Posted by frizzle on 03/01/06 21:33
ward@ wrote:
> First off, thanks to those who assisted me with the nl2br() issue.
>
> Now here is another interesting "break."
>
> I brought up a record in my edit_task page, didn't make a change, and
> hit "submit." Now please forget for a moment the fact that I hit
> submit to update a record that hadn't changed...but I received a error
> as if MySQL doesn't like making an update to a record when there isn't
> a change.
>
> Of course I wanted to check that everything was a normal and by simply
> adding another character or line break, it took the change.
>
> Thoughts as to why it wouldn't update a record that wasn't changed?
> How would I get around this if/when the client chooses this page,
> decides not to update anything, but hits Submit to return to the
> previous page???
>
> Thanks.
>
> --Ward
I bet there are better ways to achieve this, but you could compare the
data in
$_POST against the corresponding data in the DB. if they match, do
nothing.
If they don't match, update it ...
Frizzle.
[Back to original message]
|