opps.. damn comma... copy and paste job..:(

does the same thing as u suggested.. (this works for numeric lists only)


<cfquery name="Hirum_status" datasource="#ds#" username="#username#"
password="#password#">
update s8_Building_Maintenance_Activity
set Hirum_Posted ='yes'
where (id in (0#form.posted_transactions_id#))
</cfquery>


cheers
joel

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Steve Onnis
Sent: Wednesday, 16 July 2003 11:38
To: CFAussie Mailing List
Subject: [cfaussie] RE: Help Using ValueList


Thats not even very good

If nothing gets passed witht he form, then the query will error because it
will be looking at (0,)

Be better doing it thisway

<cfquery name="Hirum_status" datasource="#ds#" username="#username#"
password="#password#">
update  s8_Building_Maintenance_Activity
set             Hirum_Posted ='yes'
where   id IN  (#ListAppend(form.posted_transactions_id,0)#)
</cfquery>

Steve

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Joel Nath
Sent: Wednesday, 16 July 2003 10:26 AM
To: CFAussie Mailing List
Subject: [cfaussie] RE: Help Using ValueList



Hi,

assuming your posted_transactions_id has holds values like . .eg
23,65,43,1,89,65

i have added the 0, infront of the list value, just incase the
posted_transactions_id field comes back empty so it wont break your query.

you dont have to use the ValueList function in this case... ValueList
function is used for queries..


<cfquery name="Hirum_status" datasource="#ds#" username="#username#"
password="#password#">
update s8_Building_Maintenance_Activity
set Hirum_Posted ='yes'
where (id in (0,#form.posted_transactions_id#))
</cfquery>

hth
joel


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Claude
Raiola
Sent: Wednesday, 16 July 2003 6:50
To: CFAussie Mailing List
Subject: [cfaussie] Help Using ValueList


I am using a form page that is outputting a set of records for each
outputted record of the results set I have a hidden variable called id
present

when submitting the form page I wish to update a database take only those
records who's id's values have been passed by the form by the hidden form
variable "id"

how best do I get this working I have tried using value list however it
seems that only works when the value list has a query referenced within it
rather than a set of hidden values from the form page

the code I am trying to get working is :


<cfquery name="Hirum_status" datasource="#ds#" username="#username#"
password="#password#">
update s8_Building_Maintenance_Activity
set Hirum_Posted ='yes'
where (id in (#valuelist(form.posted_transactions_id)#))
</cfquery>

your assistance would be appreciated




Kind Regards



Claude Raiola (Director)
AustralianAccommodation.com Pty. Ltd.
Mobile: 0414 228 948
Fax: 07 3319 6444
Websites:
     www.AustralianAccommodation.com
<http://www.australianaccommodation.com/>
     www.AccommodationNewZealand.com
<http://www.accommodationnewzealand.com/>
     www.HospitalityPurchasing.net <http://www.hospitalitypurchasing.net/>
<mailto:[EMAIL PROTECTED]>



---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to