Hi
If a sector has more than two items assigned to it, it omits it from the search result
Back again.. This multiple select has been a real pain one thing solved to find another thing wrong with it.
In the search results it omits any entry that has two items or more assigned to it.
For example If a Student has more than two Sectors that he/she is interested in it omits it from the search results.
In the Database the Field MBASectorID within MBACVBook, has values 1,2,3
Because it's has more than one item selected it knocks it out.
The main Query is below. Do i need a CFloop to sort this out?
<!--- The query to gets the data to generate the list --->
<cfquery name="qCVBookSelect" datasource="#request.dsName#">
select CVBook.CVBookID ,
CVBook.MBASectorID ,
MBASector.MBASectorName ,
CVBook.MBAFunctionID ,
MBAFunction.MBAFunctionName ,
CVBook.MBALocationID ,
MBALocation.MBALocationName ,
CVBook.MBALanguageID ,
MBALanguage.MBALanguageName ,
CVBook.Firstname ,
CVBook.Lastname ,
CVBook.CVPictureFilename ,
CVBook.Telephone ,
CVBook.Email ,
CVBook.Citizenship ,
CVBook.Brief ,
CVBook.CVFilename ,
CVBook.DateCreated ,
CVBook.DateLastUpdated ,
CVBook.Updatedby ,
CVBook.Createdby
from CVBook
left join MBASector on MBASector.MBASectorID = CVBook.MBASectorID
left join MBAFunction on MBAFunction.MBAFunctionID = CVBook.MBAFunctionID
left join MBALocation on MBALocation.MBALocationID = CVBook.MBALocationID
left join MBALanguage on MBALanguage.MBALanguageID = CVBook.MBALanguageID
where 1 = 1
<cfif form.mBASectorID gt "">
and CVBook.mBASectorID in ('#form.mbasectorid#')
</cfif>
<cfif form.mBAFunctionID gt "">
and CVBook.mBAFunctionID in ('#form.mBAFunctionID#')
</cfif>
<cfif form.mBALocationID gt "">
and CVBook.mBALocationID in ('#form.mBALocationID#')
</cfif>
<cfif form.mBALanguageID gt "">
and CVBook.mBALanguageID in ('#form.mBALanguageID#')
</cfif>
</cfquery>
Thanking you in advance
Jennifer
If a sector has more than two items assigned to it, it omits it from the search result
Back again.. This multiple select has been a real pain one thing solved to find another thing wrong with it.
In the search results it omits any entry that has two items or more assigned to it.
For example If a Student has more than two Sectors that he/she is interested in it omits it from the search results.
In the Database the Field MBASectorID within MBACVBook, has values 1,2,3
Because it's has more than one item selected it knocks it out.
The main Query is below. Do i need a CFloop to sort this out?
<!--- The query to gets the data to generate the list --->
<cfquery name="qCVBookSelect" datasource="#request.dsName#">
select CVBook.CVBookID ,
CVBook.MBASectorID ,
MBASector.MBASectorName ,
CVBook.MBAFunctionID ,
MBAFunction.MBAFunctionName ,
CVBook.MBALocationID ,
MBALocation.MBALocationName ,
CVBook.MBALanguageID ,
MBALanguage.MBALanguageName ,
CVBook.Firstname ,
CVBook.Lastname ,
CVBook.CVPictureFilename ,
CVBook.Telephone ,
CVBook.Email ,
CVBook.Citizenship ,
CVBook.Brief ,
CVBook.CVFilename ,
CVBook.DateCreated ,
CVBook.DateLastUpdated ,
CVBook.Updatedby ,
CVBook.Createdby
from CVBook
left join MBASector on MBASector.MBASectorID = CVBook.MBASectorID
left join MBAFunction on MBAFunction.MBAFunctionID = CVBook.MBAFunctionID
left join MBALocation on MBALocation.MBALocationID = CVBook.MBALocationID
left join MBALanguage on MBALanguage.MBALanguageID = CVBook.MBALanguageID
where 1 = 1
<cfif form.mBASectorID gt "">
and CVBook.mBASectorID in ('#form.mbasectorid#')
</cfif>
<cfif form.mBAFunctionID gt "">
and CVBook.mBAFunctionID in ('#form.mBAFunctionID#')
</cfif>
<cfif form.mBALocationID gt "">
and CVBook.mBALocationID in ('#form.mBALocationID#')
</cfif>
<cfif form.mBALanguageID gt "">
and CVBook.mBALanguageID in ('#form.mBALanguageID#')
</cfif>
</cfquery>
Thanking you in advance
Jennifer