List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:October 4 1999 11:45pm
View as plain text  
On Mon, 1999-10-04 10:17:33 +0100, Ed Williams wrote:
> I have a MySQL Table full of web referers and want to display the
> last twenty unique visitors unique in the sense of host name the
> only problem is the referer is stored in format like so
> .When I do a select distinct it
> could return the same host address but with different referering
> pages.
> Is there a way of doing a REGEXP or somthing to just select
> different hosts.  Even worse is that I want a count of how many
> timesthe host has been refered.

You can use something like
  SUBSTRING_INDEX(SUBSTRING_INDEX(referer,'//',-1),'/',1) AS host
to access the host part only.

I hope this helps to get you going ...

Martin Ramsch <m.ramsch@stripped> <URL: >
PGP KeyID=0xE8EF4F75 FiPr=5244 5EF3 B0B1 3826  E4EC 8058 7B31 3AD7
!! HELP BADLY NEEDEDEd Williams4 Oct
  • Re: !! HELP BADLY NEEDEDThimble Smith4 Oct
  • Re: !! HELP BADLY NEEDEDMartin Ramsch5 Oct
  • Re: !! HELP BADLY NEEDEDMartin Ramsch5 Oct