~!

> Ok here's what I trying to do. I am trying to design a little
browser/ip
> tracking page and I need an SQL statement that will allow me to group
IPs
> that hit the site in 5 minute intervals (well I just want the interval
thing
> to work cuz I'll prolly want to make this like 30 minutes or a full
hour).
> The reason I want this kind of grouping is that if a person hits the
page
> constantly for 5 minutes I don't want that to push other relevant IPs
down
> the listing. Here's what I have to actually select the data from the
> database.
>
> SELECT tblVisitorHits.vIP, tblVisitorHits.vDateTime,
tblBrowser.bVersion
> FROM tblBrowser
> RIGHT JOIN tblVisitorHits ON tblVisitorHits.vBrowser = tblBrowser.bKey
> ORDER BY tblVisitorHits.vDateTime DESC, tblBrowser.bVersion ASC
> LIMIT 0, 50;
>
> // A simple group by I know will not work. but was wondering if there
> // was a way to create a more complex group by that included
expressions.
>
> I don't know how one would implement the interval grouping. Any help
would
> be graciously accepted.


How about using: expr BETWEEN min AND max?
(sorry, online manual search function not working for me right now,
please look it up for yourself)
=dn


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to