This content has been marked as final. Show 3 replies
from a coding perspective, you don't even need the initial select query. Just write an update query and use the customer number in your where clause.
from a more general perspective, what is your plan if the customer has two orders, but only one has been shipped?
Why wouldn't I need the original query? I want to see what customer #2 ordered, then have the ability to update one or more fields in one or more of his sales records. The first thing to do would be to find out what the customer ordered.
This is the crux of the problem, what if I want to update one record and leave the second, third, forth, etc alone because they haven't shipped yet?
So I use my original query to pull all the sales records using where to filter everything but customer #2's records. I use a <cfoutput query ="getsales"> <tr>
<option value ="#shipping#">#shipping#</option>
<option value="Not Shipped">Not Shipped</option></td>
to display the records and set up the form for updating.
The post method yields a value for "shipping" and "salesnum" that only seems to match the last value rendered by the query.
Hope this clarifies things, thanks for the help.
You need to do this in two steps. Step 1 gets the unshipped orders and presents them to the user in a form. He picks the records to be updated and submits the form, You then update the records he selected.