Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - sql query
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

sql query

 Post Reply Post Reply
Author
linuxjuice View Drop Down
Newbie
Newbie


Joined: 24 January 2004
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote linuxjuice Quote  Post ReplyReply Direct Link To This Post Topic: sql query
    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                             admin

table_2:

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

1    test        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? 

 

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.