List:General Discussion« Previous MessageNext Message »
From:Fernando Ulisses dos Santos Date:April 5 1999 12:12pm
Subject:Re: Selecting top level domains
View as plain text  
select * from domainlist where locate("/",domainfield)=0

this will list all the domains that don't have the "/"

hum ? you have some domains that have a "/" at the end, ok:

select * from domainlist where locate("/",domainfield)=0 or
(right(domainfield,1)="/" and locate("/",domainfield)=len(domainfield))

maybe you have to complement the last argument with a -1 or +1, I'm not
sure about it

[]'s
___
Fernando Ulisses dos Santos
Linkway ISP Network/Linux Admin

On Sun, 4 Apr 1999, Adam Powell wrote:

> 
> Hi there, I wish to write a SELECT statement to process a list of urls
> (without the leading http://) to find top level domains, ie those like
> www.something.com, www.somethingother.net, and not those with a subdirectory
> such as www.something.com/mypage.  What is the syntax of doing this?  I have
> tried a few things but cannot get it to work.
> 
> Thanks,
> Adam
> 
> 
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread1417@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.
> 

Thread
Selecting top level domainsAdam Powell5 Apr
  • Re: Selecting top level domainsFernando Ulisses dos Santos5 Apr
  • Re: Selecting top level domainsjonathan michaels8 Apr