House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

capture a search string

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hello,
Orlini, Robert
03/11/10 10:51 A
I do exactly what Bobby suggested:
Eric Nicholas Sweeney
03/11/10 11:16 A
Thanks. Working good.
Orlini, Robert
03/11/10 02:20 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Orlini, Robert
03/11/2010 10:51 AM

Hello, Is there some CF coding that I can employ that will capture a search string when users type a search and later on provide it in a report. At minimum we should capture the dateTime, userIP, search string and number of search results. The data will be stored in an SQL table. Thanks. RO HWW

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Bobby Hartsfield
03/11/2010 10:59 AM

That sounds like an application specific question. The search string is most likely submitted via form field so you can grab that from the form scope obviously. The ip address can be grabbed from cgi.remote_addr The date/time can come from #now()# The result count comes from your queries recordcount result. Then you just stick it all in a table. Hello, Is there some CF coding that I can employ that will capture a search string when users type a search and later on provide it in a report. At minimum we should capture the dateTime, userIP, search string and number of search results. The data will be stored in an SQL table. Thanks. RO HWW

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Eric Nicholas Sweeney
03/11/2010 11:16 AM

I do exactly what Bobby suggested: On the "search results page" I save the user info (IP, if logged in, etc), date-time stamp and whatever was in the "form field(s)" to a table in the DB. However - I do not save the results - just what was searched for. - Nick

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Orlini, Robert
03/11/2010 02:20 PM

Thanks. Working good. RO That sounds like an application specific question. The search string is most likely submitted via form field so you can grab that from the form scope obviously. The ip address can be grabbed from cgi.remote_addr The date/time can come from #now()# The result count comes from your queries recordcount result. Then you just stick it all in a table. Hello, Is there some CF coding that I can employ that will capture a search string when users type a search and later on provide it in a report. At minimum we should capture the dateTime, userIP, search string and number of search results. The data will be stored in an SQL table. Thanks. RO HWW


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

July 31, 2010

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
         1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31