Re: [PHP-DB] wildcard in mysql search with php

2001-10-18 Thread Thomas \"omega\" Henning

thanks
"Dave Watkinson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
select  from  where  like
'%searchword%'


RTFM!!!



-Original Message-
From: Thomas "omega" Henning [mailto:[EMAIL PROTECTED]]
Sent: 18 October 2001 14:58
To: [EMAIL PROTECTED]
Subject: [PHP-DB] wildcard in mysql search with php


Hello all,

Is there a way to use wildcards in search in a mySQL db?
e.g. I have a dbase of over 24000 records and i can only search exact
matches is there a way to search something like this : *admin* in mySQL?
Or
i have to do it by hand in PHP?

Thanks
Sir Thomas "omega" Henning



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] wildcard in mysql search with php

2001-10-18 Thread Russ Michell

Sure use:

SELECT * FROM  WHERE foo LIKE '%$bar%'

selects all records where 'bar' is found somewhere in the search string. 
See also: http://www.mysql.com/doc/S/t/String_comparison_functions.html

HTH :-)
Russ

On Thu, 18 Oct 2001 15:57:56 +0200 "Thomas \"omega\" Henning" <[EMAIL PROTECTED]> 
wrote:

> Hello all,
> 
> Is there a way to use wildcards in search in a mySQL db?
> e.g. I have a dbase of over 24000 records and i can only search exact
> matches is there a way to search something like this : *admin* in mySQL? Or
> i have to do it by hand in PHP?
> 
> Thanks
> Sir Thomas "omega" Henning
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

#---#

  "Believe nothing - consider everything"   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.com

#---#


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] wildcard in mysql search with php

2001-10-18 Thread Nally, Tyler G.

> From: Thomas "omega" Henning [mailto:[EMAIL PROTECTED]]
> Subject: [PHP-DB] wildcard in mysql search with php
>
> Is there a way to use wildcards in search in a mySQL db?
> e.g. I have a dbase of over 24000 records and i can only search exact
> matches is there a way to search something like this : 
> *admin* in mySQL? Or
> i have to do it by hand in PHP?

Sure... you do it like this...

  search column_name
from table_name
   where column_name like '%admin%'

--
__   _Tyler Nally
   / /__   _(_)___       _ _  [EMAIL PROTECTED]
  / / _ \/ __ `/ / __ \/ __ \ / __ \/ ___/ __ `/  317-860-3016
 / /  __/ /_/ / / /_/ / / / // /_/ / /  / /_/ /   American Legion Website
/_/\___/\__, /_/\/_/ /_(_)/_/   \__, /http://www.legion.org
   //  //   

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] wildcard in mysql search with php

2001-10-18 Thread Dave Watkinson

select  from  where  like
'%searchword%'


RTFM!!!



-Original Message-
From: Thomas "omega" Henning [mailto:[EMAIL PROTECTED]]
Sent: 18 October 2001 14:58
To: [EMAIL PROTECTED]
Subject: [PHP-DB] wildcard in mysql search with php


Hello all,

Is there a way to use wildcards in search in a mySQL db?
e.g. I have a dbase of over 24000 records and i can only search exact
matches is there a way to search something like this : *admin* in mySQL?
Or
i have to do it by hand in PHP?

Thanks
Sir Thomas "omega" Henning



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]