Hi All,
My page connects to 3 tables on a database, a record set for each table (it seems easiest this way because of other things that go on). Two of the tables are connected by the third, basically a contact table, a publication table and an intersection to records who receiveds what (contact fk and publication fk).
The page before allows the user to select the publication to deal with - passed to this page via a publication id. This page the outputs a list of the contacts names, alongside each is a checkbox (again, other stuff on the page means that each checkbox is uniquly identified by the contact pk). What i wanted to do is display a message where a contact already exists on the intersection table.
currently i have the following:
This works, however only for one contact out of a list of 600 - approx 30 or so DO have a fk present on the intersection table so these should all have the error message, not just the one!!
Please can someone tell me where im going wrong?
Thanks
Nicola
My page connects to 3 tables on a database, a record set for each table (it seems easiest this way because of other things that go on). Two of the tables are connected by the third, basically a contact table, a publication table and an intersection to records who receiveds what (contact fk and publication fk).
The page before allows the user to select the publication to deal with - passed to this page via a publication id. This page the outputs a list of the contacts names, alongside each is a checkbox (again, other stuff on the page means that each checkbox is uniquly identified by the contact pk). What i wanted to do is display a message where a contact already exists on the intersection table.
currently i have the following:
Code:
<cfif isDefined('qryReceived.ContactIDfk') AND #qryReceived.ContactIDfk# NEQ #qryContacts.ContactID#>
<input <cfif IsDefined('checkall')>checked<cfelseif #FORM.recPub# EQ "#qryContacts.ContactID#")>checked</cfif> type="checkbox" name="recPub" value="#qryContacts.ContactID#">
<cfelse>
Contact already receives publication.
</cfif>
This works, however only for one contact out of a list of 600 - approx 30 or so DO have a fk present on the intersection table so these should all have the error message, not just the one!!
Please can someone tell me where im going wrong?
Thanks
Nicola