At 19:01 15/10/2003 -0400, you wrote:
>UPDATE
>SET
>WHERE ID = ID_FROM_LIST
>
>Should be able to do a <cfloop list> but I'm not able to create the list.
>I'm missing an important point somewhere otherwise I'lld see it.

Are you looking for this?

UPDATE table
SET fields = values
WHERE ID IN (3,6,8,13)

The IN operator takes a comma-delimited list in parentheses (remember to
quote each value if they're strings). If you're coming from a form,
presumably items are being selected in a drop down? If you have the ID of
each item in each OPTION tag's VALUE attribute, you should be able to do this:

UPDATE table
SET fields = values
WHERE ID IN (#form.dropDownField#)

>Example problem2:
>
>I have a calendar script, would like to flag certain days and would like to
>be able to generate the list from a query.
>
>SELECT dates
>FROM somewhere
>WHERE dates LIKE '10%'
>
>and do something along the line of #ListAppend(myDateList,dates)#

Not sure what you're trying to do here, but.... Does ValueList() help?
Check docs for info on this CF function - it takes a column in a query
recordset and turns puts all the values in the column into a list. Very handy!

HTH,

Gyrus
[EMAIL PROTECTED]
http://norlonto.net/gyrus/dev/
PGP key available

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to