Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • Last Modified:

Update multiple records in CF

I have a situation where I need to get records form data base and display like excel spread sheet using text boxes in cold fusion template. Then based on user activity like i want to submit only the records user has modified and update the database.

I guess there is an easy way of doing with javascript or custom tag available. Any sort of information is appreciated. Thanks in advance.
1 Solution
suppose you have a table  users, with (id, firstname, lastname)

get the users

<cfquery name="getUsers" datasource="..." >
 select * from users

<cfoutput query="getUsers">
    <form method=post action=updatepage.cfm>
        <input type=text value=#firstname#>
        <input type=text value=#lastname#>
        <input type=hidden name=id value=#id#>
        <input type=submit value="submit">

you'd probably want to use a table to format it...

then on your updatepage.cfm

<cfquery name="...">
  update users set firstname = '#firstname#',
         lastname = '#lastname#' where id = #id#
No comment has been added lately (321 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: delete / Point Refund

a1programmer, I don't know anything about this, but I assume your comment is a valid answer, if the Mod following up want's to move this Q to a more apropriate TA, your comment should be accepted.

Please leave any comments here within 4 days.

-- Please DO NOT accept this comment as an answer ! --


EE Cleanup Volunteer

manoherAuthor Commented:
Please go ahead and delete this

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now