help with cfquery for update!
i couldn't update my database because everything is populated to an uncertain amount of rows of data with the same project name. why is it uncertain amount because this is depending on how many requested has being made to this project. let say i have a project named MTM and there are 6 requests been make to this project, therefore it will populate 6 times like this:
-----------------------------------------------------------
request| project name|Number|date|--time--|---update--
-----------------------------------------------------------
--1----|---- MTM--- |123456|4 Apr|2:15 PM|buttonUpdate
--2----|---- MTM--- |457446|3 Apr|2:30 PM|buttonUpdate
--3----|---- MTM--- |452741|2 Apr|2:20 PM|buttonUpdate
--4----|---- MTM--- |234534|5 Apr|3:15 PM|buttonUpdate
--5----|---- MTM--- |123414|4 Apr|2:45 PM|buttonUpdate
--6----|---- MTM--- |124143|3 Apr|4:15 PM|buttonUpdate
after user edit the txt field number user will click on update button.
this is my SQL and the cause of the problem:
<cfquery datasource="DBcadcam">
UPDATE table1
SET Number='#form.txtnumber#'
WHERE ProjectName=#ProjectName#
</cfquery>
the WHERE clause will give me all the 6:
ProjectName=MTM,MTM,MTM,MTM,MTM,MTM
how can i make my submit button recognize which row it is submitting?
just thought of this after typing so much ...
|