Re: newbie SELECT question

2003-10-01 Thread Michael Johnson
How about this? SELECT SUBSTRING_INDEX(SUBSTRING(url, LOCATE("//", url) + 2), '/', 1) AS domain FROM referals Michael On Wed, 1 Oct 2003 14:54:24 +0100, Graham Nichols <[EMAIL PROTECTED]> wrote: Hi, I have a table containing page referral URLs gleaned from users browsing my website. Is ther

RE: newbie SELECT question

2003-10-01 Thread Percy Williams
Could look at instr? > -Original Message- > From: Graham Nichols [mailto:[EMAIL PROTECTED] > Sent: 01 October 2003 14:54 > To: [EMAIL PROTECTED] > Subject: newbie SELECT question > > Hi, > > I have a table containing page referral URLs gleaned from users brow

newbie SELECT question

2003-10-01 Thread Graham Nichols
Hi, I have a table containing page referral URLs gleaned from users browsing my website. Is there a way for me to use SELECT based on a portion record's contents? eg table contents: http://www.yahoo.com/adirectory/apage.htm http://google.net/adirectory/anotherpage.php I wish to return only th

Re: Newbie SELECT Question

2003-08-17 Thread Ivan Cukic
Steve> select ENTITY from ATTRIBUTE where (NAME='FavoriteSport' and Steve> VALUE='Soccer') and (NAME='FavoriteFood' and VALUE='CornDogs'); Steve> Empty set (0.00 sec) Just analyze the query. You asked for a record in which name = 'FavoriteSport' AND name = 'FavoriteFood' which is always false bec

Re: Newbie SELECT Question

2003-08-17 Thread Hans-Peter Grimm
Steve Cote wrote: We are having problems with what we think is a simple select statement: select ENTITY from ATTRIBUTE where (NAME='FavoriteSport' and VALUE='Soccer') and (NAME='FavoriteFood' and VALUE='CornDogs'); You are trying to find a row with a NAME value of 'FavoriteSport' and 'Favor

Newbie SELECT Question

2003-08-17 Thread Steve Cote
We are having problems with what we think is a simple select statement: select ENTITY from ATTRIBUTE where (NAME='FavoriteSport' and VALUE='Soccer') and (NAME='FavoriteFood' and VALUE='CornDogs'); First, we are running an older version of MySQL: mysql> select version(); +--+