Skip navigation links

MySQL Forums :: Newbie :: Query for Most Recent Date from Specific Browser


Advanced Search

Query for Most Recent Date from Specific Browser
Posted by: Lost In SQL ()
Date: July 07, 2008 09:10PM

Hello,

Sorry in advance for my noob question.

Here is what I am trying to do:
I have a game server at my home on a dynamic IP. I have a program running on the game server at my home that will periodically visit a specific webpage which I have hosted at a company. I have my domain log the ip, date, and browser to that webpage and log that into a sql database. What I want to do is create a webpage that I can browse to that will list my the current IP address of my game server as well as the date. In other words I would like for it to query the most recent date from a specific browser.

Here is what I have thus far:
Using SQL version5.0.41. The database is working and logging the correct information. The columns in the database are ID, Date, IP, Browser. The database name is Log.

What I need help with:
I can not seem to get a sql query (view) in the form of php syntax that will accurately read the database and give me any output.

Here is what I have tried:
There was an earlier post in this forum asking about sorting by most recent date located here http://forums.mysql.com/read.php?10,217002,217002#msg-217002
I tried that after modifying and it did not work. Here are the queries that I have been working with.

SELECT IP, Date, Browser FROM `Log`
WHERE Browser = Netikus
LIMIT 1, 1
---------------------------------------------------------
SELECT IP, Date, Browser
FROM `Log`
WHERE IP = MAX(Date)
LIMIT 1, 1


If there is any easier way to do this I would appreciate any advice.

I realize there are sites like no-ip that will help me keep track of my IP but they use a generic domain (i.e. joeblow.gameserv.com) and I like a challenge and the thrill of getting something like this to work.

Again thanks.

Options: ReplyQuote


Subject Written By Posted
Query for Most Recent Date from Specific Browser Lost In SQL 07/07/2008 09:10PM
Re: Query for Most Recent Date from Specific Browser laptop alias 07/08/2008 12:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.