Advertisement
Guest User

Untitled

a guest
Jul 9th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <cfquery name="GetUsers" datasource="#request.DSNAME#" username="#session.QSAUsername#" password="#session.QSAPassword#">
  2. SELECT cst_Username, cst_ID, cst_FirstName, cst_LastName, cst_Company_name
  3. FROM
  4. [#request.DBNAME#].dbo.tbl_customers as cust,
  5. #request.TPPrefix#[TPCloud].dbo.PreferredCustomers as pc
  6.  
  7. WHERE
  8. cust.CST_SUBSTORE_ID = '#session.storeid#'
  9. AND pc.CUSTClient = '#session.TPC.AccountID#'
  10. AND pc.CUSTId = cust.cst_Username
  11. AND pc.CUSTGroup = '#session.groupselected#'
  12. <cfif isDefined("session.keyword")>
  13. AND (LOWER(cust.cst_FirstName) LIKE '%#LCase(session.keyword)#%'
  14. OR cust.cst_LastName LIKE '%#session.keyword#%'
  15. OR cust.cst_Username LIKE '%#session.keyword#%'
  16. OR cust.cst_Company_name LIKE '%#session.keyword#%')
  17. </cfif>
  18. ORDER BY cust.cst_Username
  19. </cfquery>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement