test following (i use this):
'%#searctext#%'

<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>

mfg
Gerd Morjan
[EMAIL PROTECTED]


-----Original Message-----
From: Tony Hicks [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 31. Mai 2001 10: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

Reply via email to