Ask a Question related to Coldfusion Database Access, Design and Development.
-
craigkaminsky #1
Selecting Records based on DB column with list
Hi,
I am stuck (and I think this will end up being a duh/d'oh thing!). I have a
dbase table called projects (Access) that contains project data. One of the
columns in the dbase is "employee_list". This column contains a list of
integers that relate to each employee assigned to a given project.
When an employee logs into the system to record their time, they are (should
be) presented with a list of projects currently assigned to them (often,
multiple employees are assigned to each project). What I need to do, as each
employee's logon is processed, is find all projects assigned to an employee.
I want to search the employee_list column to see if the id of the employee
signing in is in the list. I've tried several things (obviously not the right
ones) but am stumped. I've included the CFQUERY code below...and some comments.
If anyone cna point me in the right direction, I would greatly appreciate it.
Thank you,
Craig
<cfquery name="getDetails">
SELECT clientid, projectid, project_name, project_description, start_date,
deadline, employeeid AS project_lead, lastUpdate, lastInvoice
FROM projects
<!--- I'm stuck here...trying to determine if the employee_list field contains
the passed in value, selector_id --->
WHERE employee_list CONTAINS #selector_id#
<!--- I know the above SQL is incorrect, I just thought this better
articulates what I want to do --->
</cfquery>
craigkaminsky Guest
-
Delete mulitple records from list based on checkbox?
Hi - using ASP/ACCESS/VBscript Need an good and not expesive extension for making a page where I can delete multiple records from a list based on... -
selecting every Nth records set
I have about 16000 rows in one column, and looking to grab every 4 rows, and place them into a new table on one row with 4 columns to make 4000 rows... -
selecting based on a month in a date
Hi, Asked this on the mySQL list but it seems to be more of a PHP syntax thing that a mySQL thing. In have the following line in PHP <?php... -
Selecting records based on multiple values
I'm trying to select records which have a FIELD_VALUE = x, y, or z. I've tried several things and I can't seem to make it work correctly. Here is... -
how to Add different controls(textBox,DropDownList or some ) in the same column,based upon the value in the previous column (Say second Colum which contain dropdown with some values) ?
I am new to ASP.NET. I am facing problem with datagrid. I will explain prob now. In the datagrid the first column is name in the second... -
Tulsa #2
Re: Selecting Records based on DB column with list
<cfquery name="getDetails">
SELECT clientid, projectid, project_name, project_description, start_date,
deadline, employeeid AS project_lead, lastUpdate, lastInvoice
FROM projects
</cfquery>
<cfoutput query = "getDetails">
<cfloop from="1" to="LISTLEN(#project_list#)" index="i">
<cfif LISTGETAT(project_list,index) is selector_id>
<!---Output project details here--->
</cfloop>
</cfoutput>
Tulsa Guest



Reply With Quote

