Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Paulie579 #1
Display Returned Records
What I have is a query that returns all the parts in a service tech's kit.
I am then returing the records in a table to show all the components in thier
kit.
We is what I want to do: I want to return the component name the qty they
have and the date entered, then be able to click on a component to display the
serial numbers of that component in thier kit.
Here is the query
<CFQUERY NAME="qryGetItems" DATASOURCE="##">
SELECT fs.SerialNumber, fs.Quantity,
fs.DateEntered, c.ComponentName, e.Fullname, fs.ComponentID
FROM #CustomerSupportDB#.FieldServiceKits fs
LEFT OUTER JOIN #CustomerSupportDB#.Components c ON fs.ComponentID =
c.ComponentID
LEFT OUTER JOIN #WittDB#.Employees e ON fs.EmployeeID = e.EmployeeID
WHERE fs.EmployeeID = '#EmpIDVal#'
ORDER BY c.ComponentName ASC
</CFQUERY>
Here is the output
<cfoutput query="qryGetItems" group="ComponentName">
<cfquery dbtype="query" name="qryGetQty" >
Select Count(ComponentID) as Qty
FROM qryGetItems
Where ComponentID = #qryGetItems.ComponentID#
</cfquery>
<TR STYLE="background-color:#bgColorVal#;">
<TD CLASS="data4b" ALIGN="left" STYLE="padding:2px;">#ComponentName#</TD>
<TD BGCOLOR="black"><IMG SRC="#webroot#/images/1x1.gif" WIDTH="1"
HEIGHT="1" BORDER="0"></TD>
<TD CLASS="data4b" ALIGN="center" STYLE="padding:2px;">
#qryGetQty.QTY#
</TD>
<TD BGCOLOR="black"><IMG SRC="#webroot#/images/1x1.gif" WIDTH="1"
HEIGHT="1" BORDER="0"></TD>
<TD CLASS="data4b" ALIGN="center"
STYLE="padding:2px;">#dateFormat(DateEntered,"mmmm d, yyyy")#</TD>
<TD BGCOLOR="black"><IMG SRC="#webroot#/images/1x1.gif" WIDTH="1"
HEIGHT="1" BORDER="0"></TD>
Thanks for your help
Paulie579 Guest
-
dealing with no records returned
Hey All, I'm setting up a column in DB that gets populated by a number incremented by 1, based on the last column value entered. My problem... -
limiting the number of records returned
Hi all, The problem I am having is that I built an online query system. The problem is if the search critera is to open or loose, the coldfusion... -
Display all records on a page?
This is the code I'm using to display records from an Access database in a random order. The problem is when the page is refreshed it doesn't... -
checking how many records are returned?
Is there a way to check how many records are returned from a query to the database? -
When records don't display that are there
Hi All, Using Dreamweaver MX, Personal Web Server 4.0, VB Script, Asp Pages, MS Access Database, WIN 98 OS I basically have a Search Page with...



Reply With Quote

