Why is the action for your form titlesearchresulsts.cfm?title ?
I would bet that that the fact that you are sending a null title in the url
and a title in the form is screwing up the scoping.
Further, if I were you, I'd scope title if possible. If you know it is
always submitted from a form via post, reference form.title instead (both in
the query and the cfparam). That will avoid possible confusion in the
future.
--Ben Doom
Programmer & General Lackey
Moonbow Software
: -----Original Message-----
: From: Mike Miessen [mailto:[EMAIL PROTECTED]]
: Sent: Thursday, December 26, 2002 12:04 PM
: To: CF-Talk
: Subject: New User
:
:
: I have been trying to do a search of a database. It is a very small
: testing database and I wrote a search entry form with dream weaver with
: one field. This field should search on the title field of the database
: and return results that contain the entry. I am a raw newbie here and
: contemplating beating my head against a wall on this. Well my query
: does not seem to work. I get all the records returned every time not
: just the ones that contain the search term.
:
: Here I was thinking this would be easy. Boy was I wrong! Here is my
: code Can anyone tell me what I'm doing wrong? The path to the search
: form is
:
: http://bluegrasspro.net/bluegrasspro/datasources/eventquery.cfm
:
:
:
: <cfquery name="rsTitle" datasource="bluegrasspro" username="LOL"
: password="YeaRight" debug="yes">
: <cfparam name="TITLE" default="null">
: SELECT * FROM bluegrasscalendar WHERE Title LIKE '%#TITLE#%'
: </cfquery>
:
: <html>
: <head>
: <title>Query Results</title>
: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
: </head>
:
: <body>
: <cfoutput query="rsTitle">
: #rsTitle.Title#<br>
: </cfoutput>
:
: </body>
: </html>
:
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.