That would be a huge help. I've been stuck on this for about 3 days now...
I'm new to coldfusion and just do not understand how it is done. Thank you
very much for the help!
-----Original Message-----
From: Angel Stewart [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 06, 2000 9:50 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Help with updating a database
Hi!
I did something exactly like this for a project recently.
In my case it was a list of employees, each employee belonging to a certain
department.
There was a Search Function where the person could search by Employee ID,
Employee Name, or by Department.
Searching by Department of course produced a list of employees for editing.
The user could then click a checkbox next to the employees they actually
wished to edit, whcih then launched them into an Edit page.
This edit page contains a single form, with each Employee (in you're case
product) in its own row for editing, with one submit button at the end of
them all.
What I did was make the employee ID part of the control name, as someone has
already pointed out to you. That gets around the problem of each box having
the same id.
Then to update and insert the data, you have to use a CFQUERY with an SQL
INSERT INTO statement or an UPDATE statement with a CFLOOP.
I can't recall the exact code now, but on Monday I can surely send it to
you, and post to the list.
This is exactly the code you are looking for.
This list is an invaluable resource, as I got tons of help here whilst doing
that project :-)
Please send me an email on monday asking for the files, as I am a bit absent
minded and working toward yet another deadline, and will quite possibly
forget to send them. ;-P
-Gel
----- Original Message -----
From: Chris Farrugia <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
> Good day,
>
> I am creating the site for my computer store, where a user will be able to
> custom configure a new PC. Currently I am stuck creating an
administration
> page where I can update the prices in my database. The table has fields
> (ProductID, CategoryID (Hard Drive, Motherboard, etc), Description, Price,
> Weight). I want on the admin page for there to be all of the products
> listed in form text boxes. If I want to edit one, I can change the
content
> of that text box and then hit the submit button and it edits the database.
> The problem I'm running into is that I can't name the form fields the same
> thing because then it won't know which to edit... Can anybody explain how
I
> would do this? I am very new to coldfusion. Thank you for the help.
>
> Sincerely,
> Chris Farrugia
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.