Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfquery name="GetUsers" datasource="#request.DSNAME#" username="#session.QSAUsername#" password="#session.QSAPassword#">
- SELECT cst_Username, cst_ID, cst_FirstName, cst_LastName, cst_Company_name
- FROM
- [#request.DBNAME#].dbo.tbl_customers as cust,
- #request.TPPrefix#[TPCloud].dbo.PreferredCustomers as pc
- WHERE
- cust.CST_SUBSTORE_ID = '#session.storeid#'
- AND pc.CUSTClient = '#session.TPC.AccountID#'
- AND pc.CUSTId = cust.cst_Username
- AND pc.CUSTGroup = '#session.groupselected#'
- <cfif isDefined("session.keyword")>
- AND (LOWER(cust.cst_FirstName) LIKE '%#LCase(session.keyword)#%'
- OR cust.cst_LastName LIKE '%#session.keyword#%'
- OR cust.cst_Username LIKE '%#session.keyword#%'
- OR cust.cst_Company_name LIKE '%#session.keyword#%')
- </cfif>
- ORDER BY cust.cst_Username
- </cfquery>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement