I have two tables, tremont and charles    I want to query info from both tables, but 
filter the results based on form variables.  Something like this works
fine:

SELECT ID, category, title, format, store
FROM charles
WHERE 0=0
<!--- conditions passed from search --->
<cfif isdefined("form.title") IS "yes">
     <cfif form.title IS NOT "">
  AND title LIKE '#form.title#'
  </cfif>
</cfif>

but if I try this and add tremont, the second table, into the FROM clause I get this 
error:

The specified field 'ID' could refer to more than one table listed in the FROM clause 
of your SQL statement.

How can I get results from both tables and still be able to filter them through the 
form variables?  Thanks


Paul



Reply via email to