Hi there,
here is what I am trying to do:
I am filling a drop down box from the users table:
<cfquery name="Users" datasource="mysource">
select USERNAME from users where users.user_department='HR'
</cfquery>
This works fine but i also need to add to the list the users from sales....How do i add another where clause?
second problem:
once a user is selected from the dropdown box list( and a date from and a date to are selected)
display the cases from that user to a coldfusion page...
This is the query i started on but is not working once i add to page.
SELECT CASE_ID, CASE_COMPLETED,USERID,USERNAME FROM COMPLETED, USERS
WHERE USERS.username = 'form.username'
AND COMPLETED.CASE_COMPLETED BETWEEN 'form.txtfromdate' AND 'form.txttodate'
Not sure whether it's very clear but please help
here is what I am trying to do:
I am filling a drop down box from the users table:
<cfquery name="Users" datasource="mysource">
select USERNAME from users where users.user_department='HR'
</cfquery>
This works fine but i also need to add to the list the users from sales....How do i add another where clause?
second problem:
once a user is selected from the dropdown box list( and a date from and a date to are selected)
display the cases from that user to a coldfusion page...
This is the query i started on but is not working once i add to page.
SELECT CASE_ID, CASE_COMPLETED,USERID,USERNAME FROM COMPLETED, USERS
WHERE USERS.username = 'form.username'
AND COMPLETED.CASE_COMPLETED BETWEEN 'form.txtfromdate' AND 'form.txttodate'
Not sure whether it's very clear but please help