What I am trying to do is select the hostname out of a refering url.  Such as:

http://www.google.com/search?hl=en&ie=UTF-8&q=%22Third+Park+Point+Beach+Water+Contact+Advisory+Posted%3B+May+Indicate+Long-Term+Problem%22&btnG=Google+Search

All I really want to get is:
http://www.google.com/

So I have:

Select DISTINCT LEFT(referer, LOCATE('/',referer)-1) referer , count(*) as refCount
FROM NNtracking
WHERE referer != '' 
GROUP BY referer
Limit 10

but that only selects me:
http:/

I have tried a couple of REGEXP ^/ variations but either I am on the wrong track or I 
can't get the syntax right.

Advice?

--ja
-- 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to