You may need to add another where clause.  If you are pulling data from 3 tables, in 
order to keep from getting a cartesian result (# of rows in table 1 times #2 times #3) 
you need where a=b and b=c.


Also, if your where clause includes a human entered field that might be left blank, 
you may want to add 'where 1=1' into your select, and then have the optional search 
fields 'and searchwhatever' and 'and second search'.  By starting the where clause as 
1=1, each field that might be optional (i.e. you use a <cfif the form was entered, 
then do an 'and whatever'> can all be written with 'and' clauses instead have having 
to guess which one might be first and not having the 'and' added in twice.

Check your where clause again to start, you probably need 2 sets of ands, one to make 
sure the rows in table 1 = 2 and another for table 2 = 3 (or 1 = 3).

If you are using MS SQL, try out your select clause in the query analyzer program 
instead of CF.  It will give you an easier set of output to see the results from.  Or, 
use the <cfdump var='#recordset#'> in CF to output the entire record set.

Don't feel bad about asking questions!  Some people may be experts at one thing and 
have no clue on another.  We are all here for self improvement and fun.







 
=========================================================
Kansas City ColdFusion User Group's website & listserv is 
hosted through the generous support of Clickdoug.com
To send email to the list, email  [EMAIL PROTECTED]
To unsubscribe, send an email to  [EMAIL PROTECTED]
with the following in the BODY of the message:
unsubscribe kcfusion
For hosting solutions http://www.clickdoug.com
Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1. 
======================================================

Reply via email to