Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Paulie579 #1
Help with converting Script
I have this script and where clause working on an ASP page, but I would like to
make it work in Coldfusion. Need a little help converting it to CF.
Thanks for the input.
Script.....
<%
If (Request.Form("IPVAL") <> "") Then
IPArray = Split(Request.Form("IPVAL"),",")
For X = 0 To UBound(IPArray)
IP1 = "000"
IP2 = "000"
IP3 = "000"
IP4 = "000"
ProcessingIP = IPArray(X)
' Make sure there is a number to convert in the upper part
IP1 = Mid(ProcessingIP, InStr(ProcessingIP, ".") + 1)
IP2 = Mid(IP1, InStr(IP1, ".") + 1)
IP3 = Trim(Mid(IP2, InStr(IP2, ".") + 1))
IP4 = Right("00" + IP3, 3)
IP3 = Right("00" + Mid(IP2, 1, InStr(IP2, ".") - 1), 3)
IP2 = Right("00" + Mid(IP1, 1, InStr(IP1, ".") - 1), 3)
IP1 = Left(ProcessingIP, InStr(ProcessingIP, ".") - 1)
IPArray(X) = IP1 + "." + IP2 + "." + IP3 + "." + IP4
Next
IPList = Join(IPArray,",")
End If
%>
Select *
From IP_Device
WHERE IP_Address IN ('" & Replace(IPList,",","','") & "') ORDER BY IP"
Paulie579 Guest
-
CF Grid / Java Script / Action Script
Hi, Does anyone know of a good reference for the attributes CFgrid exposes in a flash form? eg. I would like to select the first row on load. ... -
Converting a CFC into a Script
I have a CFC with several CFFunctions that looks something like this: <cfcomponent displayname='processor'> <cffunction... -
ksh script - Preventing multiple runs of a particular script
I am having trouble with a ksh script I am writing. I need to make sure that the script is not already running when it is kicked off in cron. ... -
Help converting short php script to ASP
I've got this PHP script working on one of my sites and now need an ASP version for my intranet. I don't know ASP, can anyone help out? Know... -
Execute shell script from a perl script
Hi, How can I executed a Unix shell script from a Perl script. The shell script is a dump of a oracle table to a file. The perl script is for... -
AnXiao #2
Re: Help with converting Script
Your Sets would be <CFSet >
Your Query would be <CFQuery>
The Where Clause would countain a Where somthinf in ( #Var#)
And Your Array I Believe has a length property so if x is an array youcould
get the upper bound by x.length
or you could do len(x) for the length of the array
AnXiao Guest
-
Paulie579 #3
Re: Help with converting Script
thanks, but still a little unclear. I am still new to cf and asp.
Paulie579 Guest



Reply With Quote

