It looks like you need to add some logic to dynamically build your SQL
statements

Basically, check if a field exists; if it exists then add that field to your
sql statement

This code might help you get the idea:

<cfquery name="getemployees" datasource="hrapp">
  select departments.department.name, employees.firstname
  from departments, employees
  where departments.department_id = employees.department_id

  <cfif form.department_name is not "">
   and departments.department_name = 'form.department_name'
  </cfif>
</cfquery>


Refer to the CFDOCS for more info.

- Joseph



-----Original Message-----
From: Spaminator [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 02, 2001 1:42 AM
To: CF-Talk
Subject: RE: first web db with coldfusion5


I've got a book and finally found the info in it to get started.

Using the drop down wizard i was easily able to create the search and
results pages.

Only problem is each field is required for searching, if any fields are
blank im getting errors.

How can i modify the code so these fields are not required?

The search page is at:
http://www.sapaa.com/memdb/sapaa_search.cfm

Thanks,
Sean

-----Original Message-----
From: Ken Wilson [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 01, 2001 9:04 PM
To: CF-Talk
Subject: RE: first web db with coldfusion5


Picking up a copy of one of the many ColdFusion development books would be a
great first step and would get you on your way real fast. Bookpool
http://www.bookpool.com tends to have the best prices from what I've seen
but all the major book sites offer a range of CF books.

Ken




-----Original Message-----
From: Spaminator [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 01, 2001 11:28 PM
To: CF-Talk
Subject: RE: first web db with coldfusion5


I've done some other database driven sites but nothing in coldfusion.

I now need to host a simple access file and make it searchable. I have cold
fusion studio 5 and macromedia ultradev 4.

Can any point me in the right direction for doing that?

Thanks,


Sean Percival
Owner
Paragon Matrix - Web and Graphic Design
877.498.6072 - phone
[EMAIL PROTECTED] - email
[EMAIL PROTECTED] - wireless email
www.paragonmatrix.com - web



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to