View Single Post

   
  #3 (permalink)  
Old 05-16-2008, 01:40 PM
Captain Paralytic
 
Posts: n/a
Default Re: Query ordered by data from another table

On 13 May, 23:30, Chuck Anderson <websiteaddr...@seemy.sig> wrote:
> Good grief. I have a minor, but confusing typo:
>
> Chuck Anderson wrote:
> > ......
> > When an ip_address (visitor) visits more than 25 times in less than half
> > an hour I INSERT that into another table 'over_limit', which has four
> > columns.

>
> Should be ..... "which has *three* columns."
>
> > Table 2 -`over_limit` (3 columns)
> > over_limit_id # auto_incr
> > ip_address
> > modified_date # timestamp = date this ip_address last exceeded limit

>
> --
> *****************************
> Chuck Anderson • Boulder, CO
> http://www.CycleTourist.com
> Nothing he's got he really needs
> Twenty first century schizoid man.
> ***********************************


You have a basic flaw in this. You state "ip_address (visitor)". IP
Address does not equal visitor. With NAT routers and proxy servers,
which are extremely prevalent today, you will find many many visitors
all coming from the same IP address. I am sitting at a company at the
moment that has about 8000 people, all accessing the internet through
the same proxy. 8000 potential visitors all with the same IP address.
This is repeated all round the world.

In order to solve your query, you need to JOIN the 2 tables. But there
seems little point in doing that since the data in the tables is
meaningless within the context that you have outlined.
Reply With Quote