In article <[EMAIL PROTECTED]>,
"Jason Glicken" <[EMAIL PROTECTED]> writes:
> I have 2 tables set up in MySQL, one with a dialed number field and
> duration, the other with a list of country codes, there names, and the
> rates. I am trying to match the dialed number with country code. My
> probl
I have 2 tables set up in MySQL, one with a dialed number field and
duration, the other with a list of country codes, there names, and the
rates. I am trying to match the dialed number with country code. My
problem is I cannot get the results based on the longest possible match?
I am not even sur
I take it this is the back end for a web application of some kind.
removing the dashes before the insert with the procedural language
should be trivial. What language is on the front end of this?
Creating a regular expression which would match dashed or non-dashed
number would not be that hard
Whoops. I was thinking about how I have my isbn table stored. ;) I
prefer to remove all formatting from numbers like this(isbn, phone
numbers, social security numbers, etc) before storing them. Anyway,
here's something that should work. I'm not sure if it is the most
efficient way to do thi
Hi Bob,
I think this might be in the wrong direction - my isbn is saved with the
dashes, so I would need it to look like:
select * from test where REPLACE('myvalue','-','') = '12';
which I'm not sure will work. When I get on my machine I'll give some
variations of this a try, thanks for the qui
Oh, I think I know this one.
Copied from my console:
mysql> select * from test;
++-+
| id | myvalue |
++-+
| 1 | 12 |
| 2 | 15 |
| 3 | 3 |
| 4 | 10 |
| 5 | 10 |
| 6 | 10 |
++-+
6 rows in set (0.04 sec)
mysql> select * from tes
Hi everyone,
ok, so I know how to use RLIKE to match regular expressions. However,
let's say I have an isbn number of:
0-06-430022-6
saved in the database but someone wants to search for it by entering:
0064300226
or even
006-430-0226
So the search query needs to have its dashes removed
Roger:
Thank you for your reply, it is right on the money. I will try pattern
matching first and see how that works. I don't mind the extra
programming, and I don't expect our user base to grow significantly.
Thanks again
Mike
--
MySQL General Mailing List
For list arch
* Mike
> I want to provide free text searching on my database across
> numerous fields. The question is, is it better to use a freetext
> field, or pattern matching and or-ing the fields I want to search.
>
> What scares me off of Freetext is that I only have about 40
> records,
bject: Fulltext vs Pattern Matching?
-->
-->Hello:
-->
-->I want to provide free text searching on my database across numerous
-->fields.
-->The question is, is it better to use a freetext field, or pattern
-->matching and
-->or-ing the fields I want to search.
Or-ing across
Hello:
I want to provide free text searching on my database across numerous fields.
The question is, is it better to use a freetext field, or pattern matching and
or-ing the fields I want to search.
What scares me off of Freetext is that I only have about 40 records, they all
relate to a
Obiajulu,
Please refer to previous response and the as yet unanswered question within.
> I have the following values in my db table:
> Id. regdate
> 001040-1467
> 011910-2002
> 021700-1789
> 031550-2002
> 041600-1700
> 051900-2000
> .
Hello,
I have the following values in my db table:
Id. regdate
001040-1467
011910-2002
021700-1789
031550-2002
041600-1700
051900-2000
...
How can I use mysql RegEx to the query parameter: 1445-1600: That is to
extract those values t
Hello,
How is REGEXP used? I have looked at the manual. If I have the following
values in my db table:
Id. regdate
00ca. 1900
011910
02ca. 1700-tallet
031550-tallet
041600-1700
...
and the query parameters: 190, 155, 170, I want the result of
to use standard mysql pattern matching to do the query. A query
parameter can be 1400-2000 and the search result will be:
ca. 1900
1900
1900-tallet
1950-tallet
1500-1600
When the query parameter is 1900-1949, the result will be:
ca. 1900
1900
1900-tallet
When the query parameter is 1950 - 2000
Chan,
Thursday, May 23, 2002, 10:36:04 AM, you wrote:
>> I have a table with 2 fields, of char type.
>>
>> One field contains a 'ID number'.
>> Another field 'Aliases' contains a list of comma-delimited values. (eg
>> aaa,bbb,ccc)
>>
>> Is it possible using MySQL functions to return the 'IDnumb
> Hi,
>
> I have a table with 2 fields, of char type.
>
> One field contains a 'ID number'.
> Another field 'Aliases' contains a list of comma-delimited values. (eg
> aaa,bbb,ccc)
>
> Is it possible using MySQL functions to return the 'IDnumber' when the
> string "aaa" exists in 'Aliases' ?
> >Thanks for answering
> >"search character by character" 11 May 2002
> >Making use of a HTML textfield which sends text to
> >variable 'varLastName'.
> >How do I concatenate the variable
> part('varLastName')
> >with
> >the % part is it something like:
> >
> >SELECT LASTNAME, FIRSTNAME,
> >DEP
At 13:43 -0700 5/11/02, impala wrote:
>Thanks for answering
>"search character by character" 11 May 2002
>
>Making use of a HTML textfield which sends text to
>variable 'varLastName'.
>How do I concatenate the variable part('varLastName')
>with
>the % part is it something like:
>
>SELECT LASTNAME,
Thanks for answering
"search character by character" 11 May 2002
Making use of a HTML textfield which sends text to
variable 'varLastName'.
How do I concatenate the variable part('varLastName')
with
the % part is it something like:
SELECT LASTNAME, FIRSTNAME,
DEPARTMENT FROM EMPLOYEES WHERE LAS
Scott
> O.K. dumb question. A bigger string can't be contained in a smaller one.
> But how can I make it so someone searching "dogs" can pull up an item that
> contains dog?
My first instinct was to tell you to use perl and a dictionary of common
terms.
But I remembered there is the LIKE functi
HI CRAIG,
i'ts possible to use this query with multiple search terms?
query: "select * from TABLENAME where
if(right(SEARCHFIELD,1)='s',left(SEARCHFIELD,lenth(SEARCHFIELD)-1),SEARCHFIE
LD)
like '%SEARCHTEXT%' "
i.e: one user search for: "passaros jogos campos" [in portugueze]
the app is writt
I don't believe you could do that with a single SQL statement. The best
way would be to build intelligence into an application that would look at
the search term, determine if it is a plural by looking up it some sort of
dictionary, and then use the singular in the form %singularsearchterm%.
O.K. dumb question. A bigger string can't be contained in a smaller one.
But how can I make it so someone searching "dogs" can pull up an item that
contains dog?
Thanks,
SW
On Wednesday 10 April 2002 17:58, you wrote:
> In "MySQL" it says that adding the following to a where clause:
> like "%$s
You are searching for the word "dogs"...that word is not contained in
the word 'dog' or the phrase 'dog house.'
If you searched for '%dog%' you would get both of those results.
The wildcard character allows any other character in it's place...hence
'%dog%' finds 'mydog', 'mydogs', etc, etc...it
In "MySQL" it says that adding the following to a where clause:
like "%$somestring%";
should select matches that contain $somestring in them anywhere.
However when I use it I find that if e.g. I have an entry "dog" in the
database, if I search for "dogs", it doesn't come up. Also if I search
At 17:02 + 3/24/02, julian haffegee wrote:
>Hi all,
>
>I currently have
>
>$result = mysql_query ("SELECT title_id, title FROM documents_tbl, url_tbl
>WHERE (documents_tbl.title_id = url_tbl.url_id) AND keywords LIKE '%$temp%'
>AND title_id != '$myrow[title_id]'");
>
>this works to an extent,
Hi all,
I currently have
$result = mysql_query ("SELECT title_id, title FROM documents_tbl, url_tbl
WHERE (documents_tbl.title_id = url_tbl.url_id) AND keywords LIKE '%$temp%'
AND title_id != '$myrow[title_id]'");
this works to an extent, but 'keywords' is a text field and if $temp is for
exam
ssion matching on each row? You could add two more columns, days_mwf
and days_th, to speed up the common queries.
Bret
-Original Message-
From: Matthew Walker [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 3:46 PM
To: Douglas Brantz; [EMAIL PROTECTED]
Subject: RE: Pattern Mat
CTED]]
Sent: Tuesday, January 29, 2002 3:46 PM
To: Douglas Brantz; [EMAIL PROTECTED]
Subject: RE: Pattern Matching Problem
SELECT schdays FROM courses WHERE (schdays LIKE "M") OR (schdays LIKE
"W") OR (schdays LIKE "F")
Matthew Walker
Ecommerce Project Manager
Mountain
Try this:
select schdays from courses where schdays Regexp"[MWF]";
-Original Message-
From: Douglas Brantz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 2:59 PM
To: [EMAIL PROTECTED]
Subject: Please Help with Pattern Matching
I have a big problem with patter
alachian State University
Boone, NC 28608
828-262-6549 (office)
828-262-6312 (fax)
-Original Message-
From: Gurhan Ozen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 3:24 PM
To: Douglas Brantz; [EMAIL PROTECTED]
Subject: RE: Please Help with Pattern Matching
Doug,
MySql is
2 1:15 PM
To: [EMAIL PROTECTED]
Subject: Pattern Matching Problem
Hello,
I have a big problem! I need to match all patterns in schdays from a
variable schdays and if schdays = mwf it only turns up mwf and not all
entries containing M, W or F. Is there a way to do this?
mysql> select schday
At 15:15 -0500 1/29/02, Douglas Brantz wrote:
>Hello,
>
>I have a big problem! I need to match all patterns in schdays from a
>variable schdays and if schdays = mwf it only turns up mwf and not all
>entries containing M, W or F. Is there a way to do this?
Yes, but you can't do it with LIKE excep
In the last episode (Jan 29), Douglas Brantz said:
> I have a big problem with pattern matching;
> Why does the first example work like this I need to find everything with
> MWF in it and I only get the 1 entry? Is there a way I can make this
> work.
>
> mysql> select schda
chdays LIKE "%M%" OR LIKE "%W%" OR LIKE
"%F%";
This will return every row that has either M or W or F in the schdays
field.
Gurhan
-Original Message-
From: Douglas Brantz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 2:59 PM
To: [EMAIL PROTECT
and pattern match each one?? It
>should be easier.
I'd do this by doing a pattern match on %M% and then joining it with a
pattern match on %W% and then joining it with a pattern match on %F%. I
forget which type of join you want, it's the one that is logical-
At 14:59 -0500 1/29/02, Douglas Brantz wrote:
>I have a big problem with pattern matching;
>Why does the first example work like this I need to find everything with
>MWF in it and I only get the 1 entry? Is there a way I can make this
>work.
It's unclear what you're expe
Hello,
I have a big problem! I need to match all patterns in schdays from a
variable schdays and if schdays = mwf it only turns up mwf and not all
entries containing M, W or F. Is there a way to do this?
mysql> select schdays from courses where schdays LIKE "%MWF%";
+-+
| schdays |
+-
I have a big problem with pattern matching;
Why does the first example work like this I need to find everything with
MWF in it and I only get the 1 entry? Is there a way I can make this
work.
mysql> select schdays from courses where schdays LIKE "%MWF%";
+---
Then yes, it should be returned.
> -Original Message-
>
> On Sun, Aug 12, 2001 at 11:43:31PM -0700, Joe Sheble (Wizaerd) wrote:
> > an example would be:
> >
> > this is some text that would fall within the text field (somefield):
> >
> > "if you want to see some nice images, check out
On Sun, Aug 12, 2001 at 11:43:31PM -0700, Joe Sheble (Wizaerd) wrote:
> an example would be:
>
> this is some text that would fall within the text field (somefield):
>
> "if you want to see some nice images, check out href="http://www.photoshopuser.com>this website"
>
> and the query would be:
an example would be:
this is some text that would fall within the text field (somefield):
"if you want to see some nice images, check out http://www.photoshopuser.com>this website"
and the query would be:
WHERE somefield like '%photoshop%'
the above record should not be returned.
> -Orig
On Sat, Aug 11, 2001 at 10:54:58PM -0700, Joe Sheble (Wizaerd) wrote:
>
> I have a text field that contains some plain text intermingled with
> html tags. In querying the database, if the keyword I'm searching
> for falls within the plain text, that record should be returned.
> However, if the ke
> (REGEXP).
>
> I have a text field that contains some plain text intermingled with html
> tags. In querying the database, if the keyword I'm searching for falls
> within the plain text, that record should be returned. However, if the
> keyword falls within an html tag, it should not be returned
45 matches
Mail list logo