Skip to main content
Known Participant
August 20, 2007
Question

where column find in string

  • August 20, 2007
  • 1 reply
  • 341 views
Gday,

wonder if someone can help?
i have a url string which looks like this

page.cfm?from=888888888&text=I+faxed+a+note+2day+4+Aaron

i have some code that replaces the + symbol with a space.
i need a query to matches records by the column "NUMBER" to the "from" parameter and if my column "FIRSTNAME" appears in the string "text"

ie WHERE "Aaron" matches Aaron in the string.
This topic has been closed for replies.

1 reply

Inspiring
August 21, 2007
how about this:

<CFQUERY datasource="#application.ds#" Name="MatchUpName">
SELECT *
FROM members_table
WHERE Phone = <cfqueryparam cfsqltype="cf_sql_varchar"
value="#Number#"> AND Firstname IN (<cfqueryparam
cfsqltype="cf_sql_varchar" value="#URL.text#" list="yes" separator="+">)
</cfquery>

--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Known Participant
August 21, 2007
ok thanks for that works well, i just changed the seperator to " "

when i looked at #url.text# i got

hello craig jones

but in the actual url i have text=hello+craig+jones

wierd but it shold be ok using a space as the seperator shouldnt it?