List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:May 24 1999 12:31am
Subject:Re: searching the database using boolean
View as plain text  
On Sun, May 23, 1999 at 09:35:27PM +0700, Jimmy Rianto wrote:
> I want to use the select statement using the variable like this:
> select * from mytable where keywords like '$animals'
> but i wanted to use OR boolean. How do i do that?

Jimmy, maybe you should not be using SQL for your project.  You
can not do this with SQL - you will have to do more work.  You
may do this:

SELECT * FROM table_name WHERE keywords IN ('dog', 'cat', 'horse')

But that is hardly different from using OR explicitly.

Queries like these are fine, and are quite common in normal SQL
applications.  But if you don't want to do these kinds of queries,
then you probably want something other than SQL.

searching the database using booleanJimmy Rianto23 May
  • Re: searching the database using booleanThimble Smith24 May