i have a database with words that relate to documents.... i need an SQL statement that can search the DB for many keywords and only return documents that match all the entered keywords.
how it works now is it returns documents for each keyword - so some dont actually relate......
thanks -m
select document from doctable where keyword1 like '%$keyword1%' and keyword2 like '%$keyword2%'
etc......
depending on how you have your search, you may have to do if's or cases to append the "and" clauses onto the sql statement
its a backward DB.... words relate to documents.....
-m
yeah so what is wrong with the sql i gave you then