Hi Sanj, as well as the other replies you've had you might want to try going
back to basics with things.

If you find that you're not comfortable with the queries then just have a go
at testing them on their own. Forget about the form and just hardcode values
in.

You'll be suprised at how fast you'll pick up the basics with ColdFusion :O)

Ade

-----Original Message-----
From: sanjay sidar [mailto:[EMAIL PROTECTED]
Sent: 06 April 2004 19:11
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] search problems


Hey guys i have this code that is supposed to search for data in my access
db.  Now i have created a form in which the search is avaliable, (called
form2.cfm) the way you search on this form is by a drop-down option ie
choose a county, and you can select a country from the dropdown list.  I
have created an action page called search.cfm, (which is below), now there
is info in my database, but when i try to search for it nothing comes up,
and another thing im confused about is that if say the user tired to search
for a person's name which does exisit in my db, how do i display that?

as you may have guessed im very new to this language, so any help would be
much appreciated:-)

sanjay, p.s the code for the action page(search.cfm is below)


<body>
<cfquery name="rsSearch" datasource="sanjay_1">
        SELECT employee_name, company_name, country, region,
position,department, section, random
        FROM tblAdmins
        WHERE 1 = 1
        <CFIF isDefined("form.employee_name") and form.employee_name neq "">
        AND employee_name = '#form.employee_name#'
        <CFIF isDefined("form.company_name") and form.company_name neq "">
        AND company_name = '#form.company_name#'
        <CFIF isDefined("form.country") and form.country neq "">
        AND country = '#form.country#'
        </CFIF>
        <CFIF isDefined("form.region ") and form.region neq "">
        AND region = '#form.region #'
        </CFIF>
        <CFIF isDefined("form.section ") and form.section neq "">
        AND section = '#form.section #'
        </CFIF>
        <CFIF isDefined("form.position") and form.position neq "">
        AND position = '#form.position#'
        </CFIF>
        <CFIF isDefined("form.department ") and form.department neq "">
        AND department = '#form.department #'
        </CFIF>
</cfquery>


</body>

_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today!
http://www.msn.co.uk/messenger


--
These lists are syncronised with the CFDeveloper forum at
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided
by activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by
proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by
gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]


-- 
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]

Reply via email to