Title: Message
Oppps.
what did i miss.
i got so confused on which one to work with and thought your  snipet was the sweetest for the update price function.
for the checkbox i came up with what i thought was a elegant solution.
 
 
This was the most functional for price update ..YES or NO?
 
 
<cfloop index="x" from="1" to="#listlen(form.productpartno)#" step="1">
 
<CFQUERY NAME="updateprice" DATASOURCE="#prefs.dsn#">
UPDATE     products
SET        unitprice= #listgetat(form.price,x)#
WHERE   productpartno = '#listgetat(form.productpartno,x)#'
</CFQUERY>
 
</cfloop>
 
as for the check boxes i cant think of a way to check if they are ticked or not.
 
HMMMM
it works...... but .... back to the drawing board or ....???
 
 
 
Kind Regards
Greg Stone
PH: 0411 787 565

 
----- Original Message -----
Sent: Tuesday, June 15, 2004 5:18 PM
Subject: [cfaussie] RE: NEW batch style update request

Sorry greg
 
but thats sooooooooooooooooooooo yuk
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, June 15, 2004 4:39 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: NEW batch style update request

Hi
for all those who contributed i settled on these updates.
 
 
<!--- loop over selected fields and update table --->
<cfif isdefined("form.featured")>
<cfloop index='item' list='#form.featured#' delimiters=','>
<CFQUERY NAME="updatefeatured" datasource="#prefs.dsn#" >
UPDATE     products
SET             featured=1
WHERE       (productid = '#item#')
</CFQUERY>
</cfloop>
</cfif>
 
<cfif isdefined("form.special")>
 
<cfloop index='item' list='#form.special#' delimiters=','>
<CFQUERY NAME="updatespecial" datasource="#prefs.dsn#" >
UPDATE     products
SET             special=1
WHERE       (productid = '#item#')
</CFQUERY>
</cfloop>
</cfif>
 
<cfif isdefined("form.hiddenprod")>
<cfloop index='item' list='#form.hiddenprod#' delimiters=','>
<CFQUERY NAME="updatehiddenprod" DATASOURCE="#prefs.dsn#">
UPDATE     products
SET        hiddenprod=1
WHERE       (productid = '#item#')
</CFQUERY>
</cfloop>
</cfif>
 
<cfloop index="x" from="1" to="#listlen(form.productpartno)#" step="1">
 <CFQUERY NAME="updateprice" DATASOURCE="#prefs.dsn#">
UPDATE     products
SET        unitprice= #listgetat(form.price,x)#
WHERE   productpartno = '#listgetat(form.productpartno,x)#'
</CFQUERY>
</cfloop>
 
 
regards greg
 

 
----- Original Message -----
Sent: Tuesday, June 15, 2004 4:29 PM
Subject: [cfaussie] RE: NEW batch style update request

I would recommend against this method
 
Not very efficient and your going to run into problems especially as your dealing with checkboxes aswell which unless they are checked wont get passed with your form and thus wont be available in your list, not to mention is i check one of the boxes, trying to work out which one actually got checked would be a nightmare
 
Steve
 
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/ ---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/ ---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to