List:General Discussion« Previous MessageNext Message »
From:Gelu Date:April 29 2002 8:13pm
Subject:Re: What is the best way to do this
View as plain text  
Hi,
I think it's a not bad idea if you "look" at :
http://www.mysql.com/doc/S/t/String_functions.html
http://www.mysql.com/doc/S/t/String_comparison_functions.html
Regards,
Gelu
_____________________________________________________
G.NET SOFTWARE COMPANY

Permanent e-mail address : gg@stripped
                                          gelugogancea@stripped

----- Original Message -----
From: Jan Peuker <jan.peuker@stripped>
To: Javier <javier@stripped>
Cc: <mysql@stripped>
Sent: Monday, April 29, 2002 9:36 PM
Subject: Re: What is the best way to do this


> yep, that's the problem. But MySQL wouldn't do anything else, just a bit
> faster because there are no queries to "compile". The only problem is, i
> don't know how to split this field into single values. If this would be
> possible, you could fill another table3 w/ these values enclosed by % % as
> patterns and do this:
> select row from table2,table3 where fields-m like table3.patterns;
> This should work, regards
>
> Jan
>
> ----- Original Message -----
> From: "Javier" <javier@stripped>
> To: "Jan Peuker" <jan.peuker@stripped>
> Sent: Monday, April 29, 2002 7:48 PM
> Subject: Re: What is the best way to do this
>
>
> > Thanks, this should work, but I'm worry about the speed, because, both
> > tables are very big. Maybe exists some possibility  to do this using
> > temporary tables and mysql variables, what do you think?
> >
> > Thanks
> >
> > Javier
> >
> > ----- Original Message -----
> > From: Jan Peuker <jan.peuker@stripped>
> > To: Javier <javier@stripped>
> > Sent: Monday, April 29, 2002 6:23 PM
> > Subject: Re: What is the best way to do this
> >
> >
> > > My (dumy-newbie) opinion is, that this task would be too hard for
mysql.
> > > Better do this in your program, e.g. first do a select on table1 and
> > create
> > > an array out of the results(split the line and trim the values), then
do
> a
> > > while/for with "select row from table2 where field-m like
> '%arrayfield%'"
> > > (for sure, replace arrayfield).
> > > regards,
> > >
> > > Jan
> > >
> > > ----- Original Message -----
> > > From: "Javier" <javier@stripped>
> > > To: <mysql@stripped>
> > > Sent: Monday, April 29, 2002 6:52 PM
> > > Subject: What is the best way to do this
> > >
> > >
> > > >
> > > >  Hi everybody,
> > > >
> > > >  I need do the following:
> > > >
> > > >  I have two MySQL tables,
> > > >
> > > >  Table1
> > > >    .
> > > >    .
> > > >  field-n
> > > >    .
> > > >    .
> > > >
> > > >  Table2
> > > >    .
> > > >    .
> > > >  field-m
> > > >    .
> > > >    .
> > > >
> > > >  <field-n> and <field-m> are both varchar(100) containing
> words
> > separated
> > > by
> > > >  space.  I need to find out if any of the words in <field-n>
> also
are
> in
> > > >  <field-m>.
> > > >
> > > >  Is it possible to do that? What is the best way for it?
> > > >
> > > >  Thanks
> > > >
> > > >  Javier Diaz
> > > > IT Developer
> > > >
> > > >
> > > >
> > > >  - Scanned for all known viruses by Messagelabs --
> > > >
> > >
> ---------------------------------------------------------------------
> > > > 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
> <mysql-thread107490@stripped>
> > > > To unsubscribe, e-mail
> > > <mysql-unsubscribe-jan.peuker=janus-graphics.de@stripped>
> > > > Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php
> > > >
> > >
> > >
> > >  - Scanned for all known viruses by Messagelabs --
> >
> >
> >  - Scanned for all known viruses by Messagelabs --
>
>
> ---------------------------------------------------------------------
> 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 <mysql-thread107516@stripped>
> To unsubscribe, e-mail <mysql-unsubscribe-ggelu=arctic.ro@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>

Thread
What is the best way to do thisJavier29 Apr
  • RE: What is the best way to do thisGurhan Ozen29 Apr
  • Re: What is the best way to do thisJan Peuker29 Apr
  • Re: What is the best way to do thisGelu29 Apr