REGEXP word boundary problem

2005-03-24 Thread Paul Groves
I'm having a problem with REGEXP and word boundaries, my query does not 
throw an errow, but isn't giving me any results e.g. my query is:

SELECT * FROM object WHERE description REGEXP '[[::]]elbow[[::]]';
There are records in the object table that have the following 
description fields (as test data):

elbows ligaments
elbowed ligaments
My elbow
elbow joint
Whose elbow is that
The query should, as far as I can tell from 
http://dev.mysql.com/doc/mysql/en/regexp.html, be returning the last 
three records, but is returning nothing... any ideas? Thanks

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


Re: REGEXP word boundary problem

2005-03-24 Thread Paul Groves
Jigal van Hemert wrote:
From: Paul Groves
SELECT * FROM object WHERE description REGEXP '[[::]]elbow[[::]]';
There are records in the object table that have the following
description fields (as test data):
elbows ligaments
elbowed ligaments
My elbow
elbow joint
Whose elbow is that
The query should, as far as I can tell from
http://dev.mysql.com/doc/mysql/en/regexp.html, be returning the last
three records, but is returning nothing... any ideas? Thanks

First try:
SELECT 'My elbow' REGEXP '[[::]]elbow[[::]]';
and
SELECT 'elbowed ligaments' REGEXP '[[::]]elbow[[::]]';
to see whether the regular expression are working correctly.
Yes, these both work fine... which makes me think there is something 
wrong with my syntax for my query, but I don't know what...

I just ran a query similar to yours on a 4.0.23-standard server and it
worked like a charm!
I'm running 4.1.10a if it makes any difference
regards
Paul
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: REGEXP word boundary problem

2005-03-24 Thread Paul Groves
Paul Groves wrote:
Jigal van Hemert wrote:
From: Paul Groves
SELECT * FROM object WHERE description REGEXP '[[::]]elbow[[::]]';
There are records in the object table that have the following
description fields (as test data):
elbows ligaments
elbowed ligaments
My elbow
elbow joint
Whose elbow is that
The query should, as far as I can tell from
http://dev.mysql.com/doc/mysql/en/regexp.html, be returning the last
three records, but is returning nothing... any ideas? Thanks

First try:
SELECT 'My elbow' REGEXP '[[::]]elbow[[::]]';
and
SELECT 'elbowed ligaments' REGEXP '[[::]]elbow[[::]]';
to see whether the regular expression are working correctly.

Yes, these both work fine... which makes me think there is something 
wrong with my syntax for my query, but I don't know what...
Er... correction, it seems to work okay now, not sure what I was doing 
wrong before, sorry!

BTW is there anyway to speed up the search, as I think this may be 
pretty slow (there will be about 25000 records in the real database...) 
e.g. maybe by doing a LIKE match for %elbow% first then doing a REGEXP 
within that? Not sure how one would code the SQL for that, though...

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


Re: REGEXP word boundary problem

2005-03-24 Thread Paul Groves
Jigal van Hemert wrote:
From: Paul Groves
BTW is there anyway to speed up the search, as I think this may be
pretty slow (there will be about 25000 records in the real database...)
e.g. maybe by doing a LIKE match for %elbow% first then doing a REGEXP
within that? Not sure how one would code the SQL for that, though...

LIKE '%... ' will be pretty slow too, since it can't use an index, just like
REGEXP can't.
Take a look at http://dev.mysql.com/doc/mysql/en/fulltext-search.html ,
maybe this is what you need. Do read all the articles in section 12.6 to
make sure you know the pros and cons...
The main con for me is that it won't index words of three characters 
(which I think I will in my queries) or less unless I change the default 
server setting (can you do this on a by database basis?), which may be 
possible, but it depends where its finally hosted...

regards
Paul
--
-
'It is attitudes not policies that are stifling innovation in educational
uses of technology!' Do you agree?
To discuss this, book now for **two major e-learning conferences** at
Oxford University:
'Shock of the Old 5: Implementing Innovation' 7th April 2005
'Beyond the Red Tape' 8th April 2005
Details at: http://www.oucs.ox.ac.uk/ltg/events/
-
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


MySQL on Mac OS X?

2001-09-12 Thread Paul Groves

Has anyone had any experience of running MySQL on Mac OS X? If so, how have
you found it - is it stable and non-buggy? Also, has anyone had any
experience of using both MySQL *and* PHP together on Mac OS X? I would be
very interested to hear anyone's thoughts on this,

regards

Paul


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




MySQL on Mac OS X?

2001-09-12 Thread Paul Groves

Has anyone had any experience of running MySQL on Mac OS X? If so, how have
you found it - is it stable and non-buggy? Also, has anyone had any
experience of using both MySQL *and* PHP together on Mac OS X? I would be
very interested to hear anyone's thoughts on this,

regards

Paul

-- 
Paul Groves, HCDT Senior Project Officer
Humanities Computing Development Team
OUCS, 13 Banbury Rd, Oxford, OX6 2NN.
Tel: +44 (0)1865 273 290   Web: www.oucs.ox.ac.uk/hcdt/staff.html#paul
HCDT is part of the Learning Technologies Group www.oucs.ox.ac.uk/ltg/


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: just starting problem - WinNT

2001-08-31 Thread Paul Groves

- Original Message -
From: Neil Davies [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 31, 2001 12:11 PM
Subject: just starting problem - WinNT


 I am using, well trying to use mysql through WinNT. I have
 successfully installed mysql and have had a look at the client
 programs provided with the package. I'm trying to use mysql
 through the DOS command prompt under Windows but when I type
 C:\mysql I get an error message saying that 'it's an unspecified file,
 program, etc.' Can someone direct me where I'm going wrong.

Have you added c:\mysql\bin to your PATH?

Paul

 MySQL is installed under C:\MySQL. I get the same result when I
 try it from an explicit directory too.

 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
om
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php