Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

how to handle editing existing data while adding new data

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Introducing A New, Economical, Webhosting Provide..  
Author Message
ssami

External


Since: Nov 27, 2004
Posts: 13



(Msg. 1) Posted: Tue Jan 18, 2005 5:43 pm
Post subject: how to handle editing existing data while adding new data
Archived from groups: alt>www>webmaster (more info?)

i've been dealing with scenarios like this for a long time:

user wants to edit a set of existing data. suppose it's a list of employees.
the user wants to add a new user to the database, while doing a mass update
to all users, so, in this case, we have 5 employees on screen, the user
click's a "Add New User" button, and we add a new set of input fields for
the new user, in addition to the existing 5 sets of input fields. the
complications in a scenario are this:

1. if the user edits some of the fields for the existing users, then adds a
new user, we have to submit the form to get the new fields on screen. now,
we need to go to the database, get a record count of the first five fields
PLUS add a new set of fields for the new employee not yet in the database.
so our page logic now wants to say something like create a total of 6 sets
of input fields, 5 will have data pulled from the existing users in the
database, one set will be totally blank. this isn't too bad, but
2. what if the user edits some of the fields for the existing users, then
clicks the "Add New User" button. we've loaded the data from the database
for the existing 5 users, not the user's edited fields data.

as i say, i've dealt with this kind of thing before, but it's always a big
pain in the ass. i was thinking of just saving everything to the database
when we need to post the page to get the new fields we need and preserve the
user's edits. this means a lot more database transactions, though, so i've
not sure about the costs in terms of server work and page response. anybody
see a problem with this or have a better way of dealing with it?

tks

 >> Stay informed about: how to handle editing existing data while adding new data 
Back to top
Login to vote
usenet200501

External


Since: Jan 02, 2005
Posts: 74



(Msg. 2) Posted: Wed Jan 19, 2005 4:35 am
Post subject: Re: how to handle editing existing data while adding new data [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Steven wrote:

 > have a better way of dealing with it?

<a style='text-decoration: underline;' href="http://examples.tobyinkster.co.uk/add-and-edit-records" target="_blank">http://examples.tobyinkster.co.uk/add-and-edit-records</a>

That's from the CMS for my personal site. For those who are curious, the
other headings on the page are:

Page Attributes -- lets you set META tags for the page itself. Some of the
meta tags are interpreted in special ways by the CMS -- for example
"DC.title" is used as the page <title> and <h1> heading.

Page Relationships -- used to build <link> navigation, site map and
navigation bars.

Site Relationships -- used to build <link> navigation.

Page Body -- obvious.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ <a style='text-decoration: underline;' href="http://tobyinkster.co.uk/contact" target="_blank">http://tobyinkster.co.uk/contact</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: how to handle editing existing data while adding new data 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Adding a data feed to a site - Hi, Can anyone point me in the direction of information on adding a data feed to a website? I am an affiliate with Art.com, they have a product data feed available but I can't work out how to use it. Thanks Gerald

SQL data types - I am new to php and mySQL databases, but I am diving into the development of a database driven website to gain experience. I am struggling with the data types that a mysql database can hold. I want to store html in the database for the reason of central...

Duplicated Data? - Hi - I already have a domain name that is the same name as my brick and mortar business. I'd like to purchase a domain name that is more friendly to clients that connect to us through a search engine.(specifically I'd like to get the name of our city in....

Q: Data to Excel From Web - I am working on a project and am having some trouble making a design decision. I was hoping someone here has run into my problem before. The application is all web based running on IIS, using ASP, ADO and MS SQL Server as our DBMS. Users enter invoice..

Data Mining - What's this company Intelliseek all about? Exactly what data are they mining from me anyway? Is it just an annoyance or is it something I should be concerned about?
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]