Print Page | Close Window

sql query

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=9212
Printed Date: 29 March 2026 at 2:07pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: sql query
Posted By: linuxjuice
Subject: sql query
Date Posted: 24 January 2004 at 7:31pm

I cannot figure out this sql query i'm needing. 

i have two tables..(table_1) below

timestamp        &nb sp;   ip2                             file2      & nbsp;         & nbsp;         & nbsp;         u sername2
1074979888 12.154.102.227 http://www.url.com - http://www.url.com                             admin

table_2:

id username email password key validated admin ip lastip file time file2

1    test        mailto:m@m - m@m    2342342    41         &nbs p; 1           ; 0     1.1 1.1    http:  21  http

the 1st table holds temporary data, it's login data that gets updated every 5 minutes.  i'm wanting to show the most current entry for each username in the 1st table based off of the most current timestamp.  in other words, if user "test" is logged in and table 1 has entries of him being at page2.htm page4.htm page5.htm, i want to select the most recent page he/she was at based off of the most recent timestamp in table_1 where table 1.username2 = table_2.username.

can someone fill me in on how to do this? 

 

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net