You are here: Updates involving long list of records « PHP SQL « IT news, forums, messages
Updates involving long list of records

Posted by Kenoli on 03/09/07 03:04

I am displaying a long list of records from a mysql database in a kind
of spreadsheet format with records making up the rows and fields the
columns. The reason for this is that users have a need to scroll
through a lot of records and edit a thing here or there in a text
field, checkbox, etc.

The way I have it set up is that when they are through, they perform a
submit and all records are updated. There are some problems with
this, including the fact that if someone gets to this page in a way
that no data is displayed and hits update, they could erase the whole
database.

Is there any way to update only the records that have been changed?
As this is kind of a client side thing, I'm suspecting that javascript
may be the tool here; I know that it would be possible using AJAX.
But I'm wondering if there is some way to only select the $_POST
elements that have been changed. I can think of some complicated ways
like storing the orignal data in session variables and comparing the
new POST data with the old session data, or having the user check a
box next to the changed records (they could easily miss a record and
lose changes) or check a set of records and move them to a new page
where they alone are updated (this is less convenient for the user).
I'm wondering if there is any simpler, more elegant way.

Any ideas?

Thanks,

--Kenoli

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация