Hello;
I am trying to do a record count (how many times a user has logged on) and what was the most recent date.
Here is the code that gives me the information but I can't figure out how to do a record count and have the most recent date the user has logged on:
CODE
-----------------------------------------------
<CFQUERY NAME="GetUsers" DATASOURCE="officeDB" DBTYPE="ODBC">
SELECT *
From tblAdmins, Log
WHERE tblAdmins.User_ID = Log.User_ID
ORDER BY Stamp DESC
</CFQUERY>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<link href="forAll.css" rel="stylesheet" type="text/css">
<html>
<head>
<title>USERS REPORT FOR HEINE INTRANET VER. 2.0</title>
</head>
<body>
<TABLE WIDTH="600" CELLSPACING="2" CELLPADDING="2" BORDER="0">
<TR>
<TD class="forTexts">
<DIV ALIGN="center"><FONT SIZE="4">USERS REPORT FOR HEINE INTRANET VER. 2.0</FONT></DIV>
<BR>
<BR>
<CFOUTPUT QUERY="GetUsers">
#User_Name# #Stamp#
<br>
</CFOUTPUT>
</TD>
</TR>
</TABLE>
-------------------------------------------------
OUTPUT
Eric 10/16/03 8:33:41 AM
Eric 10/15/03 4:21:23 PM
Eric 10/15/03 3:40:39 PM
-------------------------------------------------
What I want to see
----------------------------------------------------
Eric 3 - 10/16/03 8:33:41 AM
-----------------------------------------
Any help would be appreciated.
-Eric
I am trying to do a record count (how many times a user has logged on) and what was the most recent date.
Here is the code that gives me the information but I can't figure out how to do a record count and have the most recent date the user has logged on:
CODE
-----------------------------------------------
<CFQUERY NAME="GetUsers" DATASOURCE="officeDB" DBTYPE="ODBC">
SELECT *
From tblAdmins, Log
WHERE tblAdmins.User_ID = Log.User_ID
ORDER BY Stamp DESC
</CFQUERY>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<link href="forAll.css" rel="stylesheet" type="text/css">
<html>
<head>
<title>USERS REPORT FOR HEINE INTRANET VER. 2.0</title>
</head>
<body>
<TABLE WIDTH="600" CELLSPACING="2" CELLPADDING="2" BORDER="0">
<TR>
<TD class="forTexts">
<DIV ALIGN="center"><FONT SIZE="4">USERS REPORT FOR HEINE INTRANET VER. 2.0</FONT></DIV>
<BR>
<BR>
<CFOUTPUT QUERY="GetUsers">
#User_Name# #Stamp#
<br>
</CFOUTPUT>
</TD>
</TR>
</TABLE>
-------------------------------------------------
OUTPUT
Eric 10/16/03 8:33:41 AM
Eric 10/15/03 4:21:23 PM
Eric 10/15/03 3:40:39 PM
-------------------------------------------------
What I want to see
----------------------------------------------------
Eric 3 - 10/16/03 8:33:41 AM
-----------------------------------------
Any help would be appreciated.
-Eric