> <cfquery name="recordset_search" datasource=#MM_Universe_Connection_DSN#
> username=#MM_Universe_Connection_USERNAME#
> password=#MM_Universe_Connection_PASSWORD#>
> select count(*) staff_valid
> from SQL_PERS_DATA a
> where a.EmployeeNumber = '#Search__P_STAFFNUMBER#'
> and ((a.AA_Section = '#SESSION.SECTION#')
> OR (a.AA_Section = 'CATERING')
> OR (a.AA_Section = 'CLEANING'))
> AND AA_Directorate like '%EDUCATION%'
> </cfquery>
> <cfelse>
>
> <cfquery name="recordset_search" datasource=#MM_Universe_Connection_DSN#
> username=#MM_Universe_Connection_USERNAME#
> password=#MM_Universe_Connection_PASSWORD#>
> select count(*) staff_valid
> from SQL_PERS_DATA a
> where a.EmployeeNumber = '#Search__P_STAFFNUMBER#'
> and a.BB_PostLocation = '#SESSION.SCHOOL#'
> </cfquery>
> </cfif>
Use cfqueryparam and make sure you have the right datatypes.
Jochem
--
I don't get it
immigrants don't work
and steal our jobs
- Loesje
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

