surely you need '%#Searchtext#%' rather than '#searctext#%' - and I think
you should use Like rather than =
i.e
<cfif searctext NEQ "">
AND Textdata like '%#searctext#%'
</cfif>
HTH
Dan
-----Original Message-----
From: Tony Hicks [mailto:[EMAIL PROTECTED]]
Sent: 31 May 2001 09:32
To: SQL
Subject: Bible DB Search Problem
On my bible search I have the code below, for the search query.. the problem
is that if i specify and part of the Verse text (searctext/textdata) the
thing won't display any records.. but if i change the #searctext#% to
#searctext# and I specify the whole verse text then it will come up... how
do a verse to come up if it contains the string in the textbox anywhere in
the verse?
Thanks,
Tony Hicks
<cfquery name='searchverses' datasource='thebible'>
Select
BookTitle, chapter, verse, textdata from KJV
Where 0=0
<cfif bookTitle NEQ "">
AND Book='#bookTitle#'
</cfif>
<cfif chapter NEQ "">
AND Chapter='#chapter#'
</cfif>
<cfif verse NEQ "">
AND verse='#verse#'
</cfif>
<cfif searctext NEQ "">
AND Textdata='#searctext#%'
</cfif>
</cfquery>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists