Re: Select field with multiple values using LIKE

2009-03-24 Thread Johan De Meersman
AFAIK, repeated LIKEs. On Tue, Mar 24, 2009 at 6:24 AM, Yariv Omer yar...@jungo.com wrote: Hi when I am using a query for several field's values I am using the following query: Select field from table where in ('11', '22') I need to do a LIKE search (not exact match but like match) How

Select field with multiple values using LIKE

2009-03-23 Thread Yariv Omer
Hi when I am using a query for several field's values I am using the following query: Select field from table where in ('11', '22') I need to do a LIKE search (not exact match but like match) How can I do it Thanks, Yariv -- MySQL General Mailing List For list archives:

using like

2006-08-24 Thread Marcelo Fabiani
Hi to all the group, I have a problem with a query using mysql 4.01+mysql+php This is the form i use to get the data for the query: FORM method=post action=http://www.ibtec.info/resbu.php; h1Ingrese palabra a buscar/h1 INPUT type=text name=ci INPUT type=submit value=Buscar INPUT type=reset

RE: using like

2006-08-24 Thread Jerry Schwartz
-Original Message- From: Marcelo Fabiani [mailto:[EMAIL PROTECTED] Sent: Thursday, August 24, 2006 1:38 PM To: mysql@lists.mysql.com Subject: using like Hi to all the group, I have a problem with a query using mysql 4.01+mysql+php This is the form i use to get the data for the query: FORM

Re: using like

2006-08-24 Thread Jo�o C�ndido de Souza Neto
You ought to choice one of these ways: while ($row=mysql_fetch_row($result)){ echo trtd$row[1]/td/tr \n; } OR $row = mysql_fetch_row($result); do { echo trtd$row[1]/td/tr \n; } while ($row=mysql_fetch_row($result)); Marcelo Fabiani [EMAIL PROTECTED] escreveu na mensagem

Re: using like

2006-08-24 Thread obed
On 8/24/06, João Cândido de Souza Neto [EMAIL PROTECTED] wrote: You ought to choice one of these ways: while ($row=mysql_fetch_row($result)){ echo trtd$row[1]/td/tr \n; } OR $row = mysql_fetch_row($result); do { echo trtd$row[1]/td/tr \n; } while ($row=mysql_fetch_row($result));

Optimizer Penalty for using LIKE + ORDER BY + LIMIT ?

2003-07-22 Thread Ed
: Optimizer Penalty for using LIKE + ORDER BY + LIMIT a) Using Full Text Search mysql SELECT a.dvd_id FROM dvd a, dvd_search s WHERE a.dvd_id = s.dvd_id and match (s.title) against ('breakfast' in boolean mode) ORDER BY a.title_sort, a.director LIMIT 0,50; 10 rows in set (0.00 sec) b) Using

Re: Optimizer Penalty for using LIKE + ORDER BY + LIMIT ?

2003-07-22 Thread Egor Egorov
needed. Please see below: Optimizer Penalty for using LIKE + ORDER BY + LIMIT a) Using Full Text Search mysql SELECT a.dvd_id FROM dvd a, dvd_search s WHERE a.dvd_id = s.dvd_id and match (s.title) against ('breakfast' in boolean mode) ORDER BY a.title_sort, a.director LIMIT

Using like in with nested selects

2003-04-05 Thread Pankaj Goel
Hello, I have a problem. I have two tables one with the long sentences(TABLE 1) and one with the words in that sentences(TABLE 2). what i need to do is query the TABLE 2 by giving a part of the word ---WILD CARD MATCHING-and get the complete words which contains this part. Then Use

Re: Using LIKE to search for occurence of a column value in a string

2003-03-29 Thread Jeff Moore
I am having the same problem. This Query: SELECT 'haystack needle haystack' LIKE concat('%', 'needle', '%') returns 1 However, this query does not work correctly If you generalize is to include a database column: SELECT * FROM MyTable WHERE 'haystack needle haystack' LIKE CONCAT('%',

Re: Using LIKE to search for occurence of a column value in a string

2003-03-29 Thread Trevor Smith
On Sat, 29 Mar 2003 05:43:53 -0500, Jeff Moore wrote: However, this query does not work correctly If you generalize is to include a database column: SELECT * FROM MyTable WHERE 'haystack needle haystack' LIKE CONCAT('%', NeedleColumn, '%') Two things: 1. you don't seem to need the CONCAT()

Re: Using LIKE to search for occurence of a column value in a string

2003-03-29 Thread Jeff Moore
On Saturday, March 29, 2003, at 07:41 AM, Trevor Smith wrote: 2. your syntax just seems wrong. This should be: SELECT * FROM MyTable WHERE NeedleColumn LIKE '%needle%'; to search for the string 'needle' anywhere in NeedleColumn, if that's what you were looking for. I'm jumping in mid-stream so

Using LIKE to search for occurence of a column value in a string

2003-03-23 Thread Jakob Vedel Adeltoft
I wan't to search for all rows that match a value. I have these rows: URL Name 'http://www.microsoft.com/kb/' Microsoft Knowledgebase 'http://www.microsoft.com/search/' Microsoft Search Now I wan't to find all occurences where any of above URL

RE: Using LIKE to search for occurence of a column value in a string

2003-03-23 Thread Ville Mattila
I tried to use LIKE: SELECT URL, Name FROM websites WHERE 'http://www.microsoft.com/kb/knowledgeb.asp?id=3strse=12' LIKE (URL + '%'); But this doesn't return any results. I would like the following as output: 'http://www.microsoft.com/kb/'Microsoft Knowledgebase Hi! How about the

RE: Using LIKE to search for occurence of a column value in a string

2003-03-23 Thread lasse
I thought you only could use the likesyntax like this; SELECT column from table where column like '%data%'; i have a hard time seeing what goodit would be calling a column http:// =) check; http://www.mysql.com/doc/en/Pattern_matching.html regards lasse On Sun, 23 Mar 2003, Ville Mattila

RE: Using LIKE to search for occurence of a column value in a string

2003-03-23 Thread Jeff Shapiro
The reason that what you are doing isn't working is because you are trying to find a really long string in a short string. You need to reverse your string searching. Try: SELECT URL, Name FROM websites WHERE LOCATE(URL, 'http://www.microsoft.com/kb/knowledgeb.asp?id=3strse=12') 0; Here's

RE: Using LIKE to search for occurence of a column value in a string

2003-03-23 Thread Jakob Vedel Adeltoft
-Original Message- From: Jeff Shapiro [mailto:[EMAIL PROTECTED] Sent: Sunday, March 23, 2003 7:46 PM To: [EMAIL PROTECTED] Subject: RE: Using LIKE to search for occurence of a column value in a string The reason that what you are doing isn't working is because you are trying to find

SQL query question - using LIKE

2002-03-28 Thread Mark Stringham
I have a simple search form that allows the user to search a contact db based on criteria that they choose. Search by - first name - text box last name - text box region - drop down loan officer - drop down I want the user to be able to receive results if they choose all possible criteria or

RE: SQL query question - using LIKE

2002-03-28 Thread Peter Lovatt
PROTECTED] tel. 0121-242-1473 --- -Original Message- From: Mark Stringham [mailto:[EMAIL PROTECTED]] Sent: 28 March 2002 17:21 To: MySQL Subject: SQL query question - using LIKE I have a simple search form that allows the user to search

Re: SQL query question - using LIKE

2002-03-28 Thread DL Neil
--- -Original Message- From: Mark Stringham [mailto:[EMAIL PROTECTED]] Sent: 28 March 2002 17:21 To: MySQL Subject: SQL query question - using LIKE I have a simple search form that allows the user to search a contact db based on criteria that they choose

Re: SQL query question - using LIKE

2002-03-28 Thread Mark Stringham
- using LIKE Mark, Peter, The query below assumes that the user will search of FirstName and none or more of the other fields - which was not how the question reads (to me). To answer the question it would be useful to know how you are accessing MySQL - are you using PHP (as per example code

Re: SQL query question - using LIKE

2002-03-28 Thread DL Neil
:16 Subject: Re: SQL query question - using LIKE DL - Points well taken - I am using php and doing simple validation EX - if ($fname !=) { add fname string to search variable; } And if none of the fields have been filled out I'll return an error msg. As you mentioned, Peter's logic

Re: [PHP-DB] Searching MySQL using LIKE

2001-09-21 Thread Jordan Elver
]] Sent: Friday, September 21, 2001 9:03 AM To: MySQL Mailing List; PHP DB Mailing List Subject: [PHP-DB] Searching MySQL using LIKE Hi, I'm cross posting this because it's applicable to both list ;-) I have a table which contains a field called Keywords. The field typically contains

Re: [PHP-DB] Searching MySQL using LIKE

2001-09-21 Thread Sergei Golubchik
Hi! On Sep 21, Jordan Elver wrote: Hi, Thanks for the advice. Looked on mysql.com for advice on REGEXP. Seems promising but I can't seem to find the right regexp (I hate them :-() I might just have to screen the words before I search like james suggested, does anyone know where I can