我正在使用循环查询并在存在要加入的记录时加入表。
当没有记录加入该行时,有没有办法让该行完全返回?
编辑:我错过了一个 if 语句。我正在遍历记录并检查设置选项,如果该设置选项存在于记录中并且查询“someRecord”中没有相应的记录,那么这些是我不想返回的记录。
<cfloop query="myquery">
<cfif listfindnocase(myquery.setup_option,"required_information")>
<cfquery name="someRecord" dbtype="query">
select * from second_table
where key_id = '#myquery.key_id#'
</cfquery>
<cfif someRecord.recordcount eq 0>
<!--- Need something here to remove this row from returning in the query --->
</cfif>
</cfif>
</cfloop>