Wolfgang,
Use LIKE '%life%' as in
SELECT somecolumn FROM mytable WHERE LOWER(mycolumn) LIKE '%life%'
Don't forget to compare same case strings.
Johan Alfredeen
www.pongworld.com
>From mySQL manual:
mysql> SELECT * FROM tbl_name WHERE set_col LIKE '%value%';
mysql> SELECT * FROM tbl_name WHERE
select * from yourtable where question like '%life%'
-- Original Message --
From: "Wolfgang Schneider" <[EMAIL PROTECTED]>
Reply-To: "Wolfgang Schneider" <[EMAIL PROTECTED]>
Date: Mon, 20 Aug 2001 12:22:15 +0200
>Hi
>
>I am a newbie to php + mysql and want
On Mon, 20 Aug 2001 13:35:39 +0300, Niklas Lampén wrote:
>% works as a wildcard in mySQL.
>
>Example:
>
>"SELECT * FROM table WHERE Question LIKE '%life%'" would return all rows
>with field Question containing string "life".
Hello all helpers,
well ... thanks to those who have already replied a
You can use the SQL keyword "LIKE" for this. Have a look at the MySQL docs
for full info, but the idea is you'd do something like:
$query = "SELECT * FROM table WHERE question LIKE '%". $search_phrase. "%'";
HTH
Jon
-Original Message-
From: Wolfgang Schneider [mailto:[EMAIL PROTECTED]]
% works as a wildcard in mySQL.
Example:
"SELECT * FROM table WHERE Question LIKE '%life%'" would return all rows
with field Question containing string "life".
Niklas
-Original Message-
From: Wolfgang Schneider [mailto:[EMAIL PROTECTED]]
Sent: 20. elokuuta 2001 13:22
To: php-general
You should use the "like" clause whch allows the use of wild cards %
and ?.
Have a look at the MySQL manual, it should be explained there.
HTH
Gianluca
WS> I am a newbie to php + mysql and wanted to ask for some help on a
WS> particular item which I can't seem to find "the right key" in
6 matches
Mail list logo