Why not do something like:

SELECT myTable.col
FROM myTable, otherTable
WHERE myTable.id = otherTable.ID
AND (otherTable.data LIKE "a.%" OR otherTable.data LIKE "s.%" OR
otherTable.data = "io.bean")

HTH

Sam Masiello
Systems Analyst
Chek.Com
(716) 853-1362 x289
[EMAIL PROTECTED]

 -----Original Message-----
From:   Jason Caldwell [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, April 25, 2001 5:40 PM
To:     [EMAIL PROTECTED]
Subject:        [PHP] MySQL and LIKE?

I'm trying to create a multiple pattern search using LIKE (in mySQL) -- the
following doesn't seem to work and was wondering if someone knew of an easy
efficient way of adding multiple search criteria.

SELECT myTable.col
FROM myTable, otherTable
WHERE myTable.id = otherTable.ID
AND otherTable.data LIKE ("a.%" or "s.%" or "io.bean");

So....
LIKE ("a.%" or "s.%" or "io.bean");    <<- doesn't seem to work like this.

Thanks.
Jason





--
PHP General 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 General 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]

Reply via email to